From: Junio C Hamano Date: Wed, 16 Sep 2015 19:33:16 GMT Subject: Re: [PATCH 30/67] ref-filter: drop sprintf and strcpy calls Message-ID: In-Reply-To: <20150915154813.GD29753@sigill.intra.peff.net> Jeff King writes: > The ref-filter code comes from for-each-ref, and inherited a > number of raw sprintf and strcpy calls. These are generally > all safe, as we custom-size the buffers, or are formatting > numbers into sufficiently large buffers. But we can make the > resulting code even simpler and more obviously correct by > using some of our helper functions. > > Signed-off-by: Jeff King > --- > ref-filter.c | 70 +++++++++++++++++++----------------------------------------- > 1 file changed, 22 insertions(+), 48 deletions(-) The end result indeed is much easier to read. Looks good.