summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-21 19:49:03 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-21 19:49:03 +0200
commit1dbd13d848527d0efca2db0fbcdd5ff9ed377a38 (patch)
treed603a7708e6038ee8dfda16e17fcc1b04b4c31b3
parent050f727728f0631ce2b9c5f9635054480ccea3f6 (diff)
util: an array with one entry is always ordered
-rw-r--r--src/shared/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 7f72d3a867..eb3595250d 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -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);