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 f59a85832366f6439d29afb3942fe5b8877f5cd5..a8cbb5a326d137df647fb290c794e0246f745b5e 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;
                 }