summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
authorgdt <gdt>2005-01-14 15:47:33 +0000
committergdt <gdt>2005-01-14 15:47:33 +0000
commit27902ea4e78b5bf3613d00190d2dcc9978cd4183 (patch)
tree8d59d14d5d07cd5d9812653e69b161db1f3589b6 /lib/command.c
parenta6ad83bde70e763a90c97707ee68b4dac26eba47 (diff)
downloadquagga-27902ea4e78b5bf3613d00190d2dcc9978cd4183.tar.bz2
quagga-27902ea4e78b5bf3613d00190d2dcc9978cd4183.tar.xz
2005-01-14 Greg Troxel <gdt@fnord.ir.bbn.com>
* command.c (print_version): Don't print host.name if it is NULL. Fixes segfault on Solaris reported by Goetz von Escher <goetz@open.ch> (pullup candidate)
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 9136900c..d2e93e11 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -145,8 +145,10 @@ level_match(const char *s)
void
print_version (const char *progname)
{
- printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host.name);
- printf ("%s\n", QUAGGA_COPYRIGHT);
+ printf ("%s version %s", progname, QUAGGA_VERSION);
+ if (host.name != NULL)
+ printf (" (%s)", host.name);
+ printf ("\n%s\n", QUAGGA_COPYRIGHT);
}