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

Re: [PATCH] api-trace.txt: fix typo

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 5, 2016, 20:49 UTC
Message-ID
<xmqqvb3v233e.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAPig+cRO22wVRkrMicxLe=Gw4905QMxnnxM8kvtsMJaFv76Yrg@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 19 quoted lines
> On Tue, Apr 5, 2016 at 6:05 AM, Elia Pinto <gitter.spiros@gmail.com> wrote:
>> The correct api is trace_printf_key
>>
>> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
>> ---
>> diff --git a/Documentation/technical/api-trace.txt b/Documentation/technical/api-trace.txt
>> @@ -28,7 +28,7 @@ static struct trace_key trace_foo = TRACE_KEY_INIT(FOO);
>>  static void trace_print_foo(const char *message)
>>  {
>> -       trace_print_key(&trace_foo, message);
>> +       trace_printf_key(&trace_foo, message);
>>  }
>
> Since you're touching this already, I wonder if it would make sense to
> rewrite this example to avoid the dangerous sending of an arbitrary
> string (which might contain %) to a printf-like function. Like this,
> for example:
>
>     trace_printf_key(&trace_foo, "%s", message);
Thanks, will squash in.
Previous: Eric Sunshine
Message 3 of 3 in “api-trace.txt: fix typo”
  1. api-trace.txt: fix typoElia Pinto, Apr 5, 2016
  2. Eric SunshineApr 5, 2016
  3. Junio C HamanoApr 5, 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.