{ DEVICE_FOUND_UDEV_DB, "found-udev-db" },
{ DEVICE_FOUND_MOUNT, "found-mount" },
{ DEVICE_FOUND_SWAP, "found-swap" },
- {}
};
static int device_found_to_string_many(DeviceFound flags, char **ret) {
assert(ret);
- for (i = 0; device_found_map[i].name; i++) {
+ for (i = 0; i < ELEMENTSOF(device_found_map); i++) {
if (!FLAGS_SET(flags, device_found_map[i].flag))
continue;
if (r == 0)
break;
- for (i = 0; device_found_map[i].name; i++)
+ for (i = 0; i < ELEMENTSOF(device_found_map); i++)
if (streq(word, device_found_map[i].name)) {
f = device_found_map[i].flag;
break;