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: NMichael Haggerty <mhagger@alum.mit.edu> Signed-off-by: NJeff King <peff@peff.net>
Showing
想要评论请 注册 或 登录