summary refs log tree commit diff
path: root/src/systemd/src/basic/strv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemd/src/basic/strv.c')
-rw-r--r--src/systemd/src/basic/strv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/systemd/src/basic/strv.c b/src/systemd/src/basic/strv.c
index a3660f08..08bcff6e 100644
--- a/src/systemd/src/basic/strv.c
+++ b/src/systemd/src/basic/strv.c
@@ -774,11 +774,7 @@ static int str_compare(const void *_a, const void *_b) {
 }
 
 char **strv_sort(char **l) {
-
-        if (strv_isempty(l))
-                return l;
-
-        qsort(l, strv_length(l), sizeof(char*), str_compare);
+        qsort_safe(l, strv_length(l), sizeof(char*), str_compare);
         return l;
 }