]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: an array with one entry is always ordered
authorLennart Poettering <lennart@poettering.net>
Thu, 21 May 2015 17:49:03 +0000 (19:49 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 May 2015 17:49:03 +0000 (19:49 +0200)
src/shared/util.h

index 7f72d3a8671a1b9467dfaf821866a110e5a2dee7..eb3595250dcfdc5827c601a8ef6aaa6191161a68 100644 (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);