]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2005-01-14 Greg Troxel <gdt@fnord.ir.bbn.com>
authorgdt <gdt>
Fri, 14 Jan 2005 15:47:33 +0000 (15:47 +0000)
committergdt <gdt>
Fri, 14 Jan 2005 15:47:33 +0000 (15:47 +0000)
        * 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)

lib/ChangeLog
lib/command.c

index 4410fb243364f77edaecdca13b9b0a6b314e1892..ad81ed5f99cdbcf14e862b25e234b5f24f7957d8 100644 (file)
@@ -1,3 +1,8 @@
+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>
+       
 2005-01-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * sigevent.c: (trap_default_signals) Use the SA_SIGINFO flag to
index b1260af9410b963982f731fa4d1f8b292b60699b..3891733baccd857bb512c280831aa495e08d8e4b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-   $Id: command.c,v 1.31 2005/01/02 18:51:01 hasso Exp $
+   $Id: command.c,v 1.32 2005/01/14 15:47:33 gdt Exp $
 
    Command interpreter routine for virtual terminal [aka TeletYpe]
    Copyright (C) 1997, 98, 99 Kunihiro Ishiguro
@@ -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);
 }
 
 \f