1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

sd-device: add a brief comment in device_cache_sysattr_value()

This commit is contained in:
Yu Watanabe 2021-02-20 15:26:54 +09:00
parent acfc2a1d15
commit 66efcbb149

View File

@ -1829,6 +1829,7 @@ static int device_cache_sysattr_value(sd_device *device, const char *key, char *
/* This takes the reference of the input value. The input value may be NULL.
* This replaces the value if it already exists. */
/* First, remove the old cache entry. So, we do not need to clear cache on error. */
old_value = hashmap_remove2(device->sysattr_values, key, (void **) &new_key);
if (!new_key) {
new_key = strdup(key);