diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 02:27:55 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 16:23:50 (GMT) |
commit | 1af64f73a9113b189ce4cc3e422ec927e9b32084 (patch) | |
tree | b9c3f2ab8e8c30dc27389e05a25b2ed80a9a347d /convert.h | |
parent | b383a13cc0dbed752b69d7ad249bc857b9d3607b (diff) | |
download | git-1af64f73a9113b189ce4cc3e422ec927e9b32084.zip git-1af64f73a9113b189ce4cc3e422ec927e9b32084.tar.gz git-1af64f73a9113b189ce4cc3e422ec927e9b32084.tar.bz2 |
sha1_file: introduce a constant for max header length
There were several instances of 32 sprinkled throughout this file, all
of which were used for allocating a buffer to store the header of an
object. Introduce a constant, MAX_HEADER_LEN, for this purpose.
Note that this constant is slightly larger than required; the longest
possible header is 28 (7 for "commit", 1 for a space, 20 for a 63-bit
length in decimal, and 1 for the NUL). However, the overallocation
should not cause any problems, so leave it as it is.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'convert.h')
0 files changed, 0 insertions, 0 deletions