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);