1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00

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

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