summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-03-03 11:13:25 +0100
committerJunio C Hamano <gitster@pobox.com>2024-03-03 09:47:33 -0800
commit980013e90dd12ec1ff9eec23cebb0c845f198dab (patch)
tree16af3d2c2850d474b9185b66e52806d5cbfe947c /builtin/commit.c
parent3c2a3fdc388747b9eaf4a4a4f2035c1c9ddb26d0 (diff)
t-ctype: allow NUL anywhere in the specification string
Replace the custom function is_in() for looking up a character in the specification string with memchr(3) and sizeof. This is shorter, simpler and allows NUL anywhere in the string, which may come in handy if we ever want to support more character classes that contain it. Getting the string size using sizeof only works in a macro and with a string constant. Use ARRAY_SIZE and compile-time checks to make sure we are not passed a string pointer. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions