zdev: fix copying of modified flag

The modified flag was actually never copied during merge of setting lists.
Copy the modified flag if requested.

Found using Cppcheck:
[zdev/src/setting.c:553]: (warning) Redundant assignment of 'n->modified' to itself.

Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Jens Remus
2017-09-05 22:31:48 +02:00
committed by Jan Höppner
parent 17cade6e7f
commit a4acf7c991

View File

@@ -1,7 +1,7 @@
/*
* zdev - Modify and display the persistent configuration of devices
*
* Copyright IBM Corp. 2016, 2017
* Copyright IBM Corp. 2016, 2018
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
@@ -550,7 +550,7 @@ void setting_list_merge(struct setting_list *to, struct setting_list *from,
if (specified)
n->specified = s->specified;
if (modified)
n->modified = n->modified;
n->modified = s->modified;
}
}