From a4acf7c991b00c0f84545c60fcfd46957645e4e9 Mon Sep 17 00:00:00 2001 From: Jens Remus Date: Tue, 5 Sep 2017 22:31:48 +0200 Subject: [PATCH] zdev: fix copying of modified flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jens Remus Reviewed-by: Peter Oberparleiter Signed-off-by: Jan Höppner --- zdev/src/setting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zdev/src/setting.c b/zdev/src/setting.c index 965b9289..bc46e093 100644 --- a/zdev/src/setting.c +++ b/zdev/src/setting.c @@ -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; } }