nulstr-util: Declare NULSTR_FOREACH() iterator inline

This commit is contained in:
Daan De Meyer
2022-11-11 16:31:32 +01:00
parent 5ea173a91b
commit 12e2b70f9b
44 changed files with 26 additions and 78 deletions
@@ -559,7 +559,6 @@ static int device_update_properties_bufs(sd_device *device) {
return -ENOMEM;
size_t i = 0;
char *p;
NULSTR_FOREACH(p, buf_nulstr)
buf_strv[i++] = p;
assert(i == num);
+1 -1
View File
@@ -534,7 +534,7 @@ TEST(sd_device_new_from_nulstr) {
_cleanup_(sd_device_unrefp) sd_device *device = NULL, *from_nulstr = NULL;
_cleanup_free_ char *nulstr_copy = NULL;
const char *devlink, *nulstr;
const char *nulstr;
size_t len;
assert_se(sd_device_new_from_syspath(&device, "/sys/class/net/lo") >= 0);