key = skip_leading_chars(line, NULL);
/* comment or empty line */
- if (IN_SET(key[0], '#', '\0'))
+ if (IN_SET(key[0], '#', '\0')) {
+ *ret_key = *ret_value = NULL;
return 0;
+ }
/* split key/value */
val = strchr(key, '=');
*ret_key = key;
*ret_value = val;
- return 0;
+ return 1;
}
static int import_parent_into_properties(sd_device *dev, const char *filter) {
line);
continue;
}
+ if (r == 0)
+ continue;
r = device_add_property(dev, key, value);
if (r < 0)
line);
continue;
}
+ if (r == 0)
+ continue;
r = device_add_property(dev, key, value);
if (r < 0)