diff liboctave/oct-rl-hist.c @ 3598:0ae310231c46

[project @ 2000-02-19 08:07:08 by jwe]
author jwe
date Sat, 19 Feb 2000 08:07:10 +0000
parents 9a91ef403952
children 7b957b442818
line wrap: on
line diff
--- a/liboctave/oct-rl-hist.c
+++ b/liboctave/oct-rl-hist.c
@@ -177,11 +177,8 @@
     {
       char **p = retval;
 
-      while (p)
-	{
-	  if (*p)
-	    free (*p++);
-	}
+      while (*p)
+	free (*p++);
 
       free (retval);
 
@@ -214,6 +211,9 @@
 	    sprintf (tmp, "%5d%c%s", i + history_base,
 		     hlist[i]->data ? '*' : ' ',
 		     line ? line : "");
+	  else
+	    sprintf (tmp, "%c%s", hlist[i]->data ? '*' : ' ',
+		     line ? line : "");
 
 	  retval[k++] = tmp;
 	}