git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] graph: use strbuf_addchars() to add spaces

From
Jeff King <peff@peff.net>
Date
Oct 2, 2017, 05:11 UTC
Message-ID
<20171002051118.zuiwb4jvl6duq4pv@sigill.intra.peff.net>
In-Reply-To
<16d71d5b-6abf-4dcf-0a0b-c09fda7407f7@web.de>
On Sun, Oct 01, 2017 at 04:45:45PM +0200, René Scharfe wrote:
> strbuf_addf() can be used to add a specific number of space characters
> by using the format "%*s" with an empty string and specifying the
> desired width.  Use strbuf_addchars() instead as it's shorter, makes the
> intent clearer and is a bit more efficient.
Nice. The result looks much clearer to me.

(I won't respond individually to the coccinelle transform patches you posted earlier, but they also all look obviously correct to me).

-Peff
Previous: René Scharfe
Message 2 of 2 in “graph: use strbuf_addchars() to add spaces”
  1. graph: use strbuf_addchars() to add spacesRené Scharfe, Oct 1, 2017
  2. Jeff KingOct 2, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.