sort-utils: add generic uint16_t comparison call

This commit is contained in:
Lennart Poettering
2023-10-20 15:57:58 +01:00
committed by Luca Boccassi
parent 07f314575b
commit 4c4de97db8
3 changed files with 5 additions and 4 deletions
+4
View File
@@ -31,3 +31,7 @@ void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
int cmp_int(const int *a, const int *b) {
return CMP(*a, *b);
}
int cmp_uint16(const uint16_t *a, const uint16_t *b) {
return CMP(*a, *b);
}
+1
View File
@@ -76,3 +76,4 @@ static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, compariso
})
int cmp_int(const int *a, const int *b);
int cmp_uint16(const uint16_t *a, const uint16_t *b);
-4
View File
@@ -472,10 +472,6 @@ static int boot_id_hex(const char s[static 4]) {
return id;
}
static int cmp_uint16(const uint16_t *a, const uint16_t *b) {
return CMP(*a, *b);
}
int efi_get_boot_options(uint16_t **ret_options) {
_cleanup_closedir_ DIR *dir = NULL;
_cleanup_free_ uint16_t *list = NULL;