diff options
| author | gdt <gdt> | 2005-01-14 15:47:33 +0000 | 
|---|---|---|
| committer | gdt <gdt> | 2005-01-14 15:47:33 +0000 | 
| commit | f867d32c4a0d6a18c5f7c042b9dd5798dce93e10 (patch) | |
| tree | 03ae33b1e867d97d74afbe80b8a840bfbdfb5868 /lib/command.c | |
| parent | 24e3287986f17b87e9e424f05c83ec4876ec9b24 (diff) | |
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.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/lib/command.c b/lib/command.c index b1260af9..3891733b 100644 --- a/lib/command.c +++ b/lib/command.c @@ -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);  } | 
