[PATCH 10/10] scripts/basic/fixdep: Combine two fprintf() calls into one fputs() call in usage()
From: SF Markus Elfring
Date: Fri Oct 28 2016 - 04:42:26 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxxxxxxx>
---
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