chiark / gitweb /
bus: add convenience calls for method replies, too
[elogind.git] / src / shared / conf-parser.c
index b09e90ae8bd40c672c338b1073f09fa34d6f6819..a87df382ea26cf6ac69bd5a0b2805b2bd15c66a2 100644 (file)
@@ -705,9 +705,18 @@ int config_parse_strv(
         assert(data);
 
         if (isempty(rvalue)) {
-                /* Empty assignment resets the list */
+                char **empty;
+
+                /* Empty assignment resets the list. As a special rule
+                 * we actually fill in a real empty array here rather
+                 * than NULL, since some code wants to know if
+                 * something was set at all... */
+                empty = strv_new(NULL, NULL);
+                if (!empty)
+                        return log_oom();
+
                 strv_free(*sv);
-                *sv = NULL;
+                *sv = empty;
                 return 0;
         }
 
@@ -783,7 +792,7 @@ int config_parse_path_strv(
         return 0;
 }
 
-int config_parse_usec(
+int config_parse_sec(
                 const char *filename,
                 unsigned line,
                 const char *section,
@@ -800,7 +809,7 @@ int config_parse_usec(
         assert(rvalue);
         assert(data);
 
-        if (parse_usec(rvalue, usec) < 0) {
+        if (parse_sec(rvalue, usec) < 0) {
                 log_error("[%s:%u] Failed to parse time value, ignoring: %s", filename, line, rvalue);
                 return 0;
         }