diff options
author | Jeff King <peff@peff.net> | 2018-02-14 13:08:20 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-14 10:31:10 -0800 |
commit | 7daa825d677dcbd40724cb146f3949b7d574e8b3 (patch) | |
tree | acd7bcab8da32bc3a76a4ddd350da3bedaa17584 /config.c | |
parent | test-hashmap: use strbuf_getline rather than fgets (diff) | |
download | tgif-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 'config.c')
0 files changed, 0 insertions, 0 deletions