diff options
author | Fabiano Fidêncio <fidencio@redhat.com> | 2016-11-08 20:51:42 +0100 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-09-25 21:34:52 +0200 |
commit | 76ff0b1dd08b4f7320daa2d63ed4f052757b8ddf (patch) | |
tree | fc8f892763e242eb05407757d8062d33e3dd8045 | |
parent | 1a9cdc6ba3d1f9101d84992f6e37e8739e6a9d7c (diff) | |
download | sssd-76ff0b1dd08b4f7320daa2d63ed4f052757b8ddf.tar.gz sssd-76ff0b1dd08b4f7320daa2d63ed4f052757b8ddf.tar.xz sssd-76ff0b1dd08b4f7320daa2d63ed4f052757b8ddf.zip |
TOOLS: Fix "-Wstack-protector" caught by GCC
This warning only happens when building SSSD on RHEL6.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r-- | src/tools/tools_util.c | 7 |
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); } } |