From: Junio C Hamano Date: Fri, 06 May 2016 17:34:08 GMT Subject: Re: [PATCH 3/3] test-parse-options: --expect= option to simplify tests Message-ID: In-Reply-To: Stefan Beller writes: >> + if (!item) >> + ; /* not among entries being checked */ >> + else { >> + if (strcmp((const char *)item->util, buf.buf)) { >> + printf("expected '%s', got '%s'\n", >> + (char *)item->util, buf.buf); >> + *status = 1; >> + } >> + } >> + } >> + strbuf_reset(&buf); > > strbuf_release ? Thanks for spotting a leak. I originally had the buf as static, as all generated strings are short and of similar length, in an attempt to reuse the already allocated storage instead of allocating it from scratch every call. >> >> return 0; > > return ret; ? Otherwise `ret` is unused. This, too. Thanks.