diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-07 09:27:09 -0700 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-07 09:27:09 -0700 |
| commit | 7a49a5b51ff51ca326d450976a0f89d5d50839bd (patch) | |
| tree | 662692a19a7466d7a8247c3e91e8e31b6cd5086c /vtysh/vtysh_main.c | |
| parent | 8748363d6046ec3c89ab2508ad9328b935548fce (diff) | |
Quagga: Fix some more compile warnings
The debian build process under Jessie has a 'newer' gcc
compiler that is more stringent on warnings returned.
This commit cleans up some more warnings returned.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh/vtysh_main.c')
| -rw-r--r-- | vtysh/vtysh_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 5d3a61e14d..e160e3360b 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -336,7 +336,13 @@ main (int argc, char **argv, char **env) /* Ignore error messages */ if (no_error) - freopen("/dev/null", "w", stdout); + { + if (freopen("/dev/null", "w", stdout) == NULL) + { + fprintf(stderr, "Exiting: Failed to duplicate stdout with -n option"); + exit(1); + } + } /* Make sure we pass authentication before proceeding. */ vtysh_auth (); |
