util: an array with one entry is always ordered

This commit is contained in:
Lennart Poettering 2015-05-21 19:49:03 +02:00
parent 050f727728
commit 1dbd13d848
1 changed files with 1 additions and 1 deletions

View File

@ -775,7 +775,7 @@ int shall_restore_state(void);
* that only if nmemb > 0.
*/
static inline void qsort_safe(void *base, size_t nmemb, size_t size, comparison_fn_t compar) {
if (nmemb <= 0)
if (nmemb <= 1)
return;
assert(base);