diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-05-02 10:13:35 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-05-02 10:13:35 -0700 |
| commit | d699e27bd487598bc3c5bbf649d866c5274ef8cd (patch) | |
| tree | 8e9f201a52546742933c5e92648788e5ca5c8795 /banned.h | |
| parent | cf85f4b3bd34469b75b7453f9de0315534406a41 (diff) | |
| parent | 60ff56f50372c1498718938ef504e744fe011ffb (diff) | |
| download | git-d699e27bd487598bc3c5bbf649d866c5274ef8cd.tar.xz | |
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 'banned.h')
| -rw-r--r-- | banned.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -18,6 +18,10 @@ #define strncpy(x,y,n) BANNED(strncpy) #undef strncat #define strncat(x,y,n) BANNED(strncat) +#undef strtok +#define strtok(x,y) BANNED(strtok) +#undef strtok_r +#define strtok_r(x,y,z) BANNED(strtok_r) #undef sprintf #undef vsprintf |
