summaryrefslogtreecommitdiffstats
path: root/src/tools/tools_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/tools_util.c')
-rw-r--r--src/tools/tools_util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c
index 87a17491d..146f78a89 100644
--- a/src/tools/tools_util.c
+++ b/src/tools/tools_util.c
@@ -72,18 +72,17 @@ static int setup_db(struct tools_ctx *ctx)
void usage(poptContext pc, const char *error)
{
size_t lentmp;
- char nl[2] = "";
poptPrintUsage(pc, stderr, 0);
if (error) {
lentmp = strlen(error);
if ((lentmp > 0) && (error[lentmp - 1] != '\n')) {
- nl[0]='\n';
- nl[1]='\0';
+ fprintf(stderr, "%s\n", error);
+ return;
}
- fprintf(stderr, "%s%s", error, nl);
+ fprintf(stderr, "%s", error);
}
}