sd-device: add a short comment why we simply return negative errno here on failure

This commit is contained in:
Yu Watanabe
2021-01-26 20:07:38 +09:00
parent 4f1ef7f9e0
commit 327379f5f2
+1
View File
@@ -107,6 +107,7 @@ int device_add_property_aux(sd_device *device, const char *key, const char *valu
old_value = ordered_hashmap_get2(*properties, key, (void**) &old_key);
/* ordered_hashmap_replace() does not fail when the hashmap already has the entry. */
r = ordered_hashmap_replace(*properties, new_key, new_value);
if (r < 0)
return r;