diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-05-02 19:13:35 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-05-02 19:13:35 +0200 |
commit | d699e27bd487598bc3c5bbf649d866c5274ef8cd (patch) | |
tree | 8e9f201a52546742933c5e92648788e5ca5c8795 /builtin/gc.c | |
parent | Merge branch 'jk/blame-fake-commit-label' (diff) | |
parent | banned.h: mark `strtok()` and `strtok_r()` as banned (diff) | |
download | git-d699e27bd487598bc3c5bbf649d866c5274ef8cd.tar.xz git-d699e27bd487598bc3c5bbf649d866c5274ef8cd.zip |
Merge branch 'tb/ban-strtok'
Mark strtok() and strtok_r() to be banned.
* tb/ban-strtok:
banned.h: mark `strtok()` and `strtok_r()` as banned
t/helper/test-json-writer.c: avoid using `strtok()`
t/helper/test-oidmap.c: avoid using `strtok()`
t/helper/test-hashmap.c: avoid using `strtok()`
string-list: introduce `string_list_setlen()`
string-list: multi-delimiter `string_list_split_in_place()`
Diffstat (limited to 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index c9f8557335..031d42c64c 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -1685,11 +1685,11 @@ static int get_schedule_cmd(const char **cmd, int *is_available) if (is_available) *is_available = 0; - string_list_split_in_place(&list, testing, ',', -1); + string_list_split_in_place(&list, testing, ",", -1); for_each_string_list_item(item, &list) { struct string_list pair = STRING_LIST_INIT_NODUP; - if (string_list_split_in_place(&pair, item->string, ':', 2) != 2) + if (string_list_split_in_place(&pair, item->string, ":", 2) != 2) continue; if (!strcmp(*cmd, pair.items[0].string)) { |