{"thread":{"id":"41928","subject":"[PATCH] api-trace.txt: fix typo","startedAt":"2016-04-05T10:05:23Z","lastAt":"2016-04-05T20:49:25Z","messageCount":3,"participants":["Elia Pinto","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"282693","messageId":"1459850723-46974-1-git-send-email-gitter.spiros@gmail.com","threadId":"41928","inReplyTo":null,"subject":"[PATCH] api-trace.txt: fix typo","fromName":"Elia Pinto","fromEmail":"gitter.spiros@gmail.com","sentAt":"2016-04-05T10:05:23Z","receivedAt":"2016-04-05T10:05:23Z","isPatch":true,"sender":{"key":"gitter.spiros@gmail.com","avatar":"https://avatars.githubusercontent.com/u/158490?v=4"},"body":"The correct api is trace_printf_key\n\nSigned-off-by: Elia Pinto <gitter.spiros@gmail.com>\n---\n Documentation/technical/api-trace.txt | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Documentation/technical/api-trace.txt b/Documentation/technical/api-trace.txt\nindex 389ae16..45a0ecd 100644\n--- a/Documentation/technical/api-trace.txt\n+++ b/Documentation/technical/api-trace.txt\n@@ -28,7 +28,7 @@ static struct trace_key trace_foo = TRACE_KEY_INIT(FOO);\n \n static void trace_print_foo(const char *message)\n {\n-\ttrace_print_key(&trace_foo, message);\n+\ttrace_printf_key(&trace_foo, message);\n }\n ------------\n +\n-- \n2.8.0.270.g9d4de1f.dirty\n"},{"id":"282723","messageId":"CAPig+cRO22wVRkrMicxLe=Gw4905QMxnnxM8kvtsMJaFv76Yrg@mail.gmail.com","threadId":"41928","inReplyTo":"1459850723-46974-1-git-send-email-gitter.spiros@gmail.com","subject":"Re: [PATCH] api-trace.txt: fix typo","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2016-04-05T17:15:45Z","receivedAt":"2016-04-05T17:15:45Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Apr 5, 2016 at 6:05 AM, Elia Pinto <gitter.spiros@gmail.com> wrote:\n> The correct api is trace_printf_key\n>\n> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>\n> ---\n> diff --git a/Documentation/technical/api-trace.txt b/Documentation/technical/api-trace.txt\n> @@ -28,7 +28,7 @@ static struct trace_key trace_foo = TRACE_KEY_INIT(FOO);\n>  static void trace_print_foo(const char *message)\n>  {\n> -       trace_print_key(&trace_foo, message);\n> +       trace_printf_key(&trace_foo, message);\n>  }\n\nSince you're touching this already, I wonder if it would make sense to\nrewrite this example to avoid the dangerous sending of an arbitrary\nstring (which might contain %) to a printf-like function. Like this,\nfor example:\n\n    trace_printf_key(&trace_foo, \"%s\", message);\n"},{"id":"282731","messageId":"xmqqvb3v233e.fsf@gitster.mtv.corp.google.com","threadId":"41928","inReplyTo":"CAPig+cRO22wVRkrMicxLe=Gw4905QMxnnxM8kvtsMJaFv76Yrg@mail.gmail.com","subject":"Re: [PATCH] api-trace.txt: fix typo","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-04-05T20:49:25Z","receivedAt":"2016-04-05T20:49:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Tue, Apr 5, 2016 at 6:05 AM, Elia Pinto <gitter.spiros@gmail.com> wrote:\n>> The correct api is trace_printf_key\n>>\n>> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>\n>> ---\n>> diff --git a/Documentation/technical/api-trace.txt b/Documentation/technical/api-trace.txt\n>> @@ -28,7 +28,7 @@ static struct trace_key trace_foo = TRACE_KEY_INIT(FOO);\n>>  static void trace_print_foo(const char *message)\n>>  {\n>> -       trace_print_key(&trace_foo, message);\n>> +       trace_printf_key(&trace_foo, message);\n>>  }\n>\n> Since you're touching this already, I wonder if it would make sense to\n> rewrite this example to avoid the dangerous sending of an arbitrary\n> string (which might contain %) to a printf-like function. Like this,\n> for example:\n>\n>     trace_printf_key(&trace_foo, \"%s\", message);\n\nThanks, will squash in.\n"}]}