summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-04-18 17:18:35 -0400
committerJunio C Hamano <gitster@pobox.com>2019-04-19 14:33:21 +0900
commit08bf354de71a806bad319ec236740ac698b58a5b (patch)
tree8056fc31cd23e69c206b54f2bd2b91ad16f1f047 /GIT-VERSION-GEN
parentb511d6d569ce8baee888700ebd12f82d991a5250 (diff)
downloadgit-08bf354de71a806bad319ec236740ac698b58a5b.tar.gz
untracked-cache: simplify parsing by dropping "len"
The code which parses untracked-cache extensions from disk keeps a "len" variable, which is the size of the string we are parsing. But since we now have an "end of string" variable, we can just use that to get the length when we need it. This eliminates the need to keep "len" up to date (and removes the possibility of any errors where "len" and "eos" get out of sync). As a bonus, it means we are not storing a string length in an "int", which is a potential source of overflows (though in this case it seems fairly unlikely for that to cause any memory problems). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'GIT-VERSION-GEN')
0 files changed, 0 insertions, 0 deletions