diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2012-11-04 07:46:52 +0100 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-11-04 06:46:55 -0500 |
commit | 1173bb331103b7e6d9e95549c7b7be12546d0697 (patch) | |
tree | 20519a5aedba8ac129b00e7c35ddac50556f98ff /strbuf.h | |
parent | b8c2c1fa35f240ea8eee719c0f5a657285864573 (diff) | |
download | git-1173bb331103b7e6d9e95549c7b7be12546d0697.tar.gz |
strbuf_split_buf(): simplify iteration
While iterating, update str and slen to keep track of the part of the
string that hasn't been processed yet rather than computing things
relative to the start of the original string. This eliminates one
local variable, reduces the scope of another, and reduces the amount
of arithmetic needed within the loop.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'strbuf.h')
0 files changed, 0 insertions, 0 deletions