[PATCH 3/3] complete: Use string_list_add_sort_uniq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/complete.c | 9 +--------
 1 file changed, 1 insertion(+), 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);
 			}
 		}
 
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux