summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-02-17 19:54:29 +0100
committerKay Sievers <kay@vrfy.org>2013-02-17 19:54:29 +0100
commit02a6fc3ea69ba8801bc1864dd393d8df31559667 (patch)
treee4ddf2a52ab0713636875d7770193ed3e0b704e6 /src/shared
parentddb5bee15a6ad71e5b596c035c1ee4dc04d5fd2e (diff)
efi: compare by substraction
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/efivars.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index 8494f37729..c42956f84d 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -308,12 +308,7 @@ static int boot_id_hex(const char s[4]) {
static int cmp_uint16(const void *_a, const void *_b) {
const uint16_t *a = _a, *b = _b;
- if (*a < *b)
- return -1;
- if (*a > *b)
- return 1;
-
- return 0;
+ return (int)*a - (int)*b;
}
int efi_get_boot_options(uint16_t **options) {