chiark / gitweb /
sysctl: fix uninitalized memory access in error path
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Feb 2013 14:55:32 +0000 (09:55 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Feb 2013 14:55:52 +0000 (09:55 -0500)
src/sysctl/sysctl.c: In function ‘parse_file’:
src/sysctl/sysctl.c:172:41: warning: ‘property’ may be used uninitialized in this function [-Wmaybe-uninitialized]

src/sysctl/sysctl.c

index f59a858..a8cbb5a 100644 (file)
@@ -169,7 +169,8 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
                 existing = hashmap_get(sysctl_options, p);
                 if (existing) {
                         if (!streq(value, existing))
-                                log_warning("Two ore more conflicting assignments of %s, ignoring.", property);
+                                log_warning("Duplicate assignment of %s in file '%s', ignoring.",
+                                            p, path);
 
                         continue;
                 }