chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ddb5bee
)
efi: compare by substraction
author
Kay Sievers
<kay@vrfy.org>
Sun, 17 Feb 2013 18:54:29 +0000
(19:54 +0100)
committer
Kay Sievers
<kay@vrfy.org>
Sun, 17 Feb 2013 18:54:29 +0000
(19:54 +0100)
src/shared/efivars.c
patch
|
blob
|
history
diff --git
a/src/shared/efivars.c
b/src/shared/efivars.c
index 8494f37729504d747d186dacca1c7137bdb84c5f..c42956f84dc9f7bd785c4d62965249ddc635de05 100644
(file)
--- 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) {