summaryrefslogtreecommitdiff
path: root/streaming.c
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-08-26 10:28:11 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-26 09:21:01 -0700
commitcfdc88f1a34ccb8e59899501b0ede875afac0d83 (patch)
treeb9ae15a82d3b2002e34fb63e4a57aacedf9a1277 /streaming.c
parentget_oid_hex_segment(): don't pad the rest of `oid` (diff)
downloadtgif-cfdc88f1a34ccb8e59899501b0ede875afac0d83.tar.xz
hex_to_bytes(): simpler replacement for `get_oid_hex_segment()`
Now that `get_oid_hex_segment()` does less, it makes sense to rename it and simplify its semantics: * Instead of a `hex_len` parameter, which was the number of hex characters (and had to be even), use a `len` parameter, which is the number of resulting bytes. This removes then need for the check that `hex_len` is even and to divide it by two to determine the number of bytes. For good hygiene, declare the `len` parameter to be `size_t` instead of `unsigned int`. * Change the order of the arguments to the more traditional (dst, src, len). * Rename the function to `hex_to_bytes()`. * Remove a loop variable: just count `len` down instead. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'streaming.c')
0 files changed, 0 insertions, 0 deletions