Skip to content

Commit

Permalink
efi: compare by substraction
Browse files Browse the repository at this point in the history
  • Loading branch information
kaysievers committed Feb 17, 2013
1 parent ddb5bee commit 02a6fc3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/shared/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 02a6fc3

Please sign in to comment.