[Pdbg] [PATCH 4/5] main: Do not reset the previous selections in the list
Amitay Isaacs
amitay at ozlabs.org
Thu Aug 9 15:19:26 AEST 2018
This allows calling parse_list() multiple times to incrementally keep
selecting entries for options -p/-c/-t/-l.
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
src/main.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/main.c b/src/main.c
index d7c8589..1ab0cff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -181,10 +181,6 @@ static bool parse_list(const char *arg, int max, int *list, int *count)
strcpy(str, arg);
- for (i = 0; i < max; i++) {
- list[i] = 0;
- }
-
tmp = str;
while ((tok = strtok_r(tmp, ",", &saveptr)) != NULL) {
char *a, *b, *endptr, *saveptr2 = NULL;
--
2.17.1
More information about the Pdbg
mailing list