diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-07 18:27:09 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-10-07 18:27:09 +0200 |
commit | 7a49a5b51ff51ca326d450976a0f89d5d50839bd (patch) | |
tree | 662692a19a7466d7a8247c3e91e8e31b6cd5086c /vtysh | |
parent | Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga in... (diff) | |
download | frr-7a49a5b51ff51ca326d450976a0f89d5d50839bd.tar.xz frr-7a49a5b51ff51ca326d450976a0f89d5d50839bd.zip |
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')
-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 5d3a61e14..e160e3360 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 (); |