aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-09-27 13:57:01 +0000
committerJunio C Hamano <gitster@pobox.com>2022-09-27 09:32:26 -0700
commitd151f0cce7fca1fc156a9ea1dc98c59e1be512c9 (patch)
tree2c238bf0c5686833843318f3fcc781b264aaf066 /t
parent50a044f1e407ef217cb5d057af08e9e87daddc78 (diff)
downloadgit-d151f0cce7fca1fc156a9ea1dc98c59e1be512c9.tar.gz
string-list: document iterator behavior on NULL input
The for_each_string_list_item() macro takes a string_list and automatically constructs a for loop to iterate over its contents. This macro will segfault if the list is non-NULL. We cannot change the macro to be careful around NULL values because there are many callers that use the address of a local variable, which will never be NULL and will cause compile errors with -Werror=address. For now, leave a documentation comment to try to avoid mistakes in the future where a caller does not check for a NULL list. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions