nulstr-util: Declare NULSTR_FOREACH() iterator inline
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user