lkml.org 
[lkml]   [2017]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 2/2] It makes the code clearer and less error prone.
On Thu,  3 Aug 2017 00:15:58 +0200
Federico Vaga <federico.vaga@vaga.pv.it> wrote:

Why did you change the subject? The previous patch had a much better
one: "trace-cmd: Use asprintf when possible"

Or was it the tool you used to send the patches that chopped it off?

A quick scan of the patch looks good. I'll look a bit deeper at it, and
if I don't find anything, I'll apply it (and fix the subject).

Thanks!

-- Steve

> clearer:
> - less code
> - the code is now using the same format to create strings dynamically
>
> less error prone:
> - no magic number +2 +9 +5 to compute the size
> - no copy&paste of the strings to compute the size and to concatenate
>
> The function `asprintf` is not POSIX standard but the program
> was already using it. Later it can be decided to use only POSIX
> functions, then we can easly replace all the `asprintf(3)` with a local
> implementation of that function.
>
> Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
> ---
> event-plugin.c | 24 ++++++++--------------
>

\
 
 \ /
  Last update: 2017-08-14 19:34    [W:0.052 / U:4.888 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site