002-replace-nitems.patch 348 B

1234567891011
  1. --- a/src/libudev.c
  2. +++ b/src/libudev.c
  3. @@ -175,7 +175,7 @@ populate_properties_list(struct udev_dev
  4. struct udev_list_entry **list_end = &udev_device->properties_list;
  5. - for (unsigned i = 0; i < nitems(ids); ++i) {
  6. + for (unsigned i = 0; i < (sizeof(ids) / sizeof(ids[0])); ++i) {
  7. char const *id = ids[i];
  8. struct udev_list_entry *le;