Simplify cases where a strbuf_reset is immediately followed by a strbuf_add by using strbuf_set operations. Signed-off-by: Jeremiah Mahler <jmmahler@xxxxxxxxx> --- diffcore-order.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diffcore-order.c b/diffcore-order.c index 97dd3d0..5a93971 100644 --- a/diffcore-order.c +++ b/diffcore-order.c @@ -63,8 +63,7 @@ static int match_order(const char *path) static struct strbuf p = STRBUF_INIT; for (i = 0; i < order_cnt; i++) { - strbuf_reset(&p); - strbuf_addstr(&p, path); + strbuf_setstr(&p, path); while (p.buf[0]) { char *cp; if (!wildmatch(order[i], p.buf, 0, NULL)) -- 2.0.0.592.gf55b190 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html