From: Lennart Poettering Date: Thu, 21 May 2015 17:49:03 +0000 (+0200) Subject: util: an array with one entry is always ordered X-Git-Tag: v220~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dbd13d848527d0efca2db0fbcdd5ff9ed377a38;p=thirdparty%2Fsystemd.git util: an array with one entry is always ordered --- diff --git a/src/shared/util.h b/src/shared/util.h index 7f72d3a8671..eb3595250dc 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);