From 27902ea4e78b5bf3613d00190d2dcc9978cd4183 Mon Sep 17 00:00:00 2001 From: gdt Date: Fri, 14 Jan 2005 15:47:33 +0000 Subject: 2005-01-14 Greg Troxel * command.c (print_version): Don't print host.name if it is NULL. Fixes segfault on Solaris reported by Goetz von Escher (pullup candidate) --- lib/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/command.c') 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); } -- cgit v1.2.3