]> git.proxmox.com Git - mirror_frr.git/commitdiff
Brown paperbag, please. Don't segfault if VTYSH_PAGER isn't defined.
authorhasso <hasso>
Fri, 27 Aug 2004 14:23:28 +0000 (14:23 +0000)
committerhasso <hasso>
Fri, 27 Aug 2004 14:23:28 +0000 (14:23 +0000)
vtysh/vtysh.c

index 28ad39b1c2190f7cd0b4b994564a3fe786fa52e9..45596b2997001beb8df554d270ceae7442ce406a 100644 (file)
@@ -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");
 }