chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Never call qsort on potentially NULL arrays
[elogind.git]
/
src
/
shared
/
efivars.c
diff --git
a/src/shared/efivars.c
b/src/shared/efivars.c
index c015b168579ebb25c8eace507c775b572d79a317..f3eb6a6e5d1ca321555820a4141f2a0b7291f377 100644
(file)
--- a/
src/shared/efivars.c
+++ b/
src/shared/efivars.c
@@
-384,8
+384,7
@@
int efi_get_boot_options(uint16_t **options) {
list[count ++] = id;
}
- if (list)
- qsort(list, count, sizeof(uint16_t), cmp_uint16);
+ qsort_safe(list, count, sizeof(uint16_t), cmp_uint16);
*options = list;
return count;