diff options
author | hasso <hasso> | 2004-08-27 14:23:28 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-08-27 14:23:28 +0000 |
commit | f5c8ac55fc25f5bcffcd81391fee42c9913f471c (patch) | |
tree | 19fa2c83fc68dea2cdbf4d97c66e6acdda35c38f /vtysh | |
parent | a23d944fbc844e5231c88bd7e0ced1cc4d8f16e9 (diff) | |
download | quagga-f5c8ac55fc25f5bcffcd81391fee42c9913f471c.tar.bz2 quagga-f5c8ac55fc25f5bcffcd81391fee42c9913f471c.tar.xz |
Brown paperbag, please. Don't segfault if VTYSH_PAGER isn't defined.
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 28ad39b1..45596b29 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -212,8 +212,13 @@ vtysh_exit_ripd_only () void vtysh_pager_init () { - vtysh_pager_name = strdup (getenv ("VTYSH_PAGER")); - if (! vtysh_pager_name) + char *pager_defined; + + pager_defined = getenv ("VTYSH_PAGER"); + + if (pager_defined) + vtysh_pager_name = strdup (pager_defined); + else vtysh_pager_name = strdup ("more"); } |