summaryrefslogtreecommitdiff
path: root/src/shared/efivars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/efivars.c')
-rw-r--r--src/shared/efivars.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index fcc0db8b0b..e96748efde 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -563,10 +563,8 @@ static int boot_id_hex(const char s[4]) {
return id;
}
-static int cmp_uint16(const void *_a, const void *_b) {
- const uint16_t *a = _a, *b = _b;
-
- return (int)*a - (int)*b;
+static int cmp_uint16(const uint16_t *a, const uint16_t *b) {
+ return CMP(*a, *b);
}
int efi_get_boot_options(uint16_t **options) {
@@ -604,7 +602,7 @@ int efi_get_boot_options(uint16_t **options) {
list[count++] = id;
}
- qsort_safe(list, count, sizeof(uint16_t), cmp_uint16);
+ typesafe_qsort(list, count, cmp_uint16);
*options = TAKE_PTR(list);