diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-08-08 18:16:07 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-08-08 18:16:07 +0200 |
commit | b955575d6e5b35341982c64ab9053c31b1e42a48 (patch) | |
tree | 087a31cb0359a36d4fbd21da87738adbfd41c947 /src/locale-root.c | |
parent | 6cd94fad12ca4e038aac409e8e1cb9a332a80a39 (diff) |
afb-evt: fix a bug discovered by clang-check
Change-Id: I6bb1dffeb17fdcaf6e3a2686651d35dd0b0500b9
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/locale-root.c')
-rw-r--r-- | src/locale-root.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale-root.c b/src/locale-root.c index ece4456f..8386e669 100644 --- a/src/locale-root.c +++ b/src/locale-root.c @@ -263,7 +263,8 @@ static int init_container(struct locale_container *container, int dirfd) } /* sort the folders */ - qsort(container->folders, container->count, sizeof *container->folders, compare_folders_for_qsort); + if (container->count) + qsort(container->folders, container->count, sizeof *container->folders, compare_folders_for_qsort); /* build the parents links */ i = container->count; |