summaryrefslogtreecommitdiff
path: root/common/complete.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-02-02 21:13:28 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-03-16 11:31:22 +0100
commitfa39b6afe1f0c6d0ca55f1446a11278115b2e00e (patch)
tree75dd987d31188ec52bd9628f959e835680e12480 /common/complete.c
parenta863d2c542fd74a7f5d90bc399ab9ec12933d030 (diff)
downloadbarebox-fa39b6afe1f0c6d0ca55f1446a11278115b2e00e.tar.gz
complete: Use string_list_add_sort_uniq()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/complete.c')
-rw-r--r--common/complete.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/common/complete.c b/common/complete.c
index ad630f4c95..e504b75606 100644
--- a/common/complete.c
+++ b/common/complete.c
@@ -101,14 +101,7 @@ static int path_command_complete(struct string_list *sl, char *instr)
else
strcat(tmp, " ");
- /* This function is called
- * after command_complete,
- * so we check if a double
- * entry exist */
- if (string_list_contains
- (sl, tmp) == 0) {
- string_list_add_sorted(sl, tmp);
- }
+ string_list_add_sort_uniq(sl, tmp);
}
}