lkml.org 
[lkml]   [2016]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 10/10] scripts/basic/fixdep: Combine two fprintf() calls into one fputs() call in usage()
    From
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Fri, 28 Oct 2016 09:45:30 +0200

    Some data were printed by two separate function calls.
    Print the same data by a single call of the function "fputs" instead.

    This issue was detected also by using the Coccinelle software.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    scripts/basic/fixdep.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
    index 911347a..bdd031f 100644
    --- a/scripts/basic/fixdep.c
    +++ b/scripts/basic/fixdep.c
    @@ -122,8 +122,10 @@ char *cmdline;

    static void usage(void)
    {
    - fprintf(stderr, "Usage: fixdep [-e] <depfile> <target> <cmdline>\n");
    - fprintf(stderr, " -e insert extra dependencies given on stdin\n");
    + if (fputs("Usage: fixdep [-e] <depfile> <target> <cmdline>\n"
    + " -e insert extra dependencies given on stdin\n", stderr)
    + < 0)
    + perror("fixdep: usage");
    exit(1);
    }

    --
    2.10.1
    \
     
     \ /
      Last update: 2016-10-28 10:43    [W:3.438 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site