summaryrefslogtreecommitdiff
path: root/compat/hstrerror.c
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2018-02-14 13:08:20 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-02-14 10:31:10 -0800
commit7daa825d677dcbd40724cb146f3949b7d574e8b3 (patch)
treeacd7bcab8da32bc3a76a4ddd350da3bedaa17584 /compat/hstrerror.c
parenttest-hashmap: use strbuf_getline rather than fgets (diff)
downloadtgif-7daa825d677dcbd40724cb146f3949b7d574e8b3.tar.xz
test-hashmap: simplify alloc_test_entry
This function takes two ptr/len pairs, which implies that they can be arbitrary buffers. But internally, it assumes that each "ptr" is NUL-terminated at "len" (because we memcpy an extra byte to pick up the NUL terminator). In practice this works because each caller only ever passes strlen(ptr) as the length. But let's drop the "len" parameters to make our expectations clear. Note that we can get rid of the "l1" and "l2" variables from cmd_main() as a further cleanup, since they are now mostly used to check whether the p1 and p2 arguments are present (technically the length parameters conflated NULL with the empty string, which we no longer do, but I think that is actually an improvement). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/hstrerror.c')
0 files changed, 0 insertions, 0 deletions