1
0
mirror of https://github.com/git/git.git synced 2024-09-28 17:22:20 +02:00
git/compat
Jeff King c3d8da571f read-cache: use get_be32 instead of hand-rolled ntoh_l
Commit d60c49c (read-cache.c: allow unaligned mapping of the
index file, 2012-04-03) introduced helpers to access
unaligned data. However, we already have get_be32, which has
a few advantages:

  1. It's already written, so we avoid duplication.

  2. It's probably faster, since it does the endian
     conversion and the alignment fix at the same time.

  3. The get_be32 code is well-tested, having been in
     block-sha1 for a long time. By contrast, our custom
     helpers were probably almost never used, since the user
     needed to manually define a macro to enable them.

We have to add a get_be16 implementation to the existing
get_be32, but that is very simple to do.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-23 14:03:48 -08:00
..
fnmatch
nedmalloc
poll
regex
vcbuild
win32
apple-common-crypto.h
basename.c
bswap.h read-cache: use get_be32 instead of hand-rolled ntoh_l 2014-01-23 14:03:48 -08:00
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c
mingw.h
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h
obstack.c
obstack.h
pread.c
precompose_utf8.c
precompose_utf8.h
qsort.c
setenv.c
snprintf.c
strcasestr.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c