chiark / gitweb /
journal: properly implement matching with multiple matches
[elogind.git] / src / conf-parser.c
index a99c70596b0a52eb6aeeb7bc78d5af6691a5f232..a71dcd0d8fb8c87460ea24f81b244334ce740519 100644 (file)
@@ -88,7 +88,8 @@ int config_item_perf_lookup(
         else {
                 char *key;
 
-                if (asprintf(&key, "%s.%s", section, lvalue) < 0)
+                key = join(section, ".", lvalue, NULL);
+                if (!key)
                         return -ENOMEM;
 
                 p = lookup(key, strlen(key));
@@ -313,7 +314,7 @@ int config_parse(
                                 continuation = c;
                         else {
                                 continuation = strdup(l);
-                                if (!c) {
+                                if (!continuation) {
                                         r = -ENOMEM;
                                         goto finish;
                                 }