_cleanup_strv_free_ char **files = NULL;
size_t n_allocated = *n_entries;
- bool added = false;
char **f;
int r;
continue;
(*n_entries) ++;
- added = true;
}
- if (added)
- typesafe_qsort(*entries, *n_entries, boot_entry_compare);
-
return 0;
}
_cleanup_(closedirp) DIR *d = NULL;
size_t n_allocated = *n_entries;
- bool added = false;
struct dirent *de;
int r;
continue;
(*n_entries) ++;
- added = true;
}
- if (added)
- typesafe_qsort(*entries, *n_entries, boot_entry_compare);
-
return 0;
}
return r;
}
+ typesafe_qsort(config->entries, config->n_entries, boot_entry_compare);
+
r = boot_entries_uniquify(config->entries, config->n_entries);
if (r < 0)
return log_error_errno(r, "Failed to uniquify boot entries: %m");