commit | 1173bb331103b7e6d9e95549c7b7be12546d0697 | [log] [tgz] |
---|---|---|
author | Michael Haggerty <mhagger@alum.mit.edu> | Sun Nov 04 07:46:52 2012 +0100 |
committer | Jeff King <peff@peff.net> | Sun Nov 04 06:46:55 2012 -0500 |
tree | 20519a5aedba8ac129b00e7c35ddac50556f98ff | |
parent | b8c2c1fa35f240ea8eee719c0f5a657285864573 [diff] |
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>