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

Re: [PATCH] use strbuf_addstr() for adding constant strings to a strbuf, part 2

From
Jeff King <peff@peff.net>
Date
Sep 15, 2016, 18:44 UTC
Message-ID
<20160915184448.awipvg2kmlq7weei@sigill.intra.peff.net>
In-Reply-To
<f7294ac5-8302-03fb-d756-81a1c029a813@web.de>
On Thu, Sep 15, 2016 at 08:31:00PM +0200, René Scharfe wrote:
Show 6 quoted lines
> Replace uses of strbuf_addf() for adding strings with more lightweight
> strbuf_addstr() calls.  This makes the intent clearer and avoids
> potential issues with printf format specifiers.
> 
> 02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases,
> this patch covers eleven more.
Great, these all look obviously correct.
> A semantic patch for Coccinelle is included for easier checking for
> new cases that might be introduced in the future.

I think there was some discussion in brian's object_id patches about whether we wanted to carry Coccinelle transformations in the tree, but I don't remember the outcome. I don't have an opinion myself.

> Silly question: Is there a natural language that uses percent signs
> as letters or e.g. instead of commas? :)

I don't know, but if they do, they'd better get used to escaping them. :)

-Peff
Previous: René ScharfeNext: Junio C Hamano
Message 2 of 10 in “use strbuf_addstr() for adding constant strings to a strbuf, part 2”
  1. use strbuf_addstr() for adding constant strings to a strbuf, part 2René Scharfe, Sep 15, 2016
  2. Jeff KingSep 15, 2016
  3. Junio C HamanoSep 15, 2016
  4. Jeff KingSep 15, 2016
  5. René ScharfeSep 15, 2016
  6. Junio C HamanoSep 15, 2016
  7. René ScharfeSep 15, 2016
  8. Junio C HamanoSep 15, 2016
  9. René ScharfeOct 2, 2016
  10. brian m. carlsonSep 15, 2016

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.