summaryrefslogtreecommitdiff
path: root/t/t4018/cpp-operator-definition
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2019-04-18 17:18:35 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-19 14:33:21 +0900
commit08bf354de71a806bad319ec236740ac698b58a5b (patch)
tree8056fc31cd23e69c206b54f2bd2b91ad16f1f047 /t/t4018/cpp-operator-definition
parentuntracked-cache: simplify parsing by dropping "next" (diff)
downloadtgif-08bf354de71a806bad319ec236740ac698b58a5b.tar.xz
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 't/t4018/cpp-operator-definition')
0 files changed, 0 insertions, 0 deletions