about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2001-04-10 18:03:58 +0000
committerWayne Davison <wayned@users.sourceforge.net>2001-04-10 18:03:58 +0000
commit6d4a1bbc5c253dc93adaf5c7d602076270acfd6c (patch)
treeec0e1350872149349522e481efc052b4c22abdd4 /Src/hist.c
parent09f7ed0d1fce3edbe73802633d9ad1edcd30a84f (diff)
downloadzsh-6d4a1bbc5c253dc93adaf5c7d602076270acfd6c.tar.gz
zsh-6d4a1bbc5c253dc93adaf5c7d602076270acfd6c.tar.xz
zsh-6d4a1bbc5c253dc93adaf5c7d602076270acfd6c.zip
Slightly optimized should_ignore_line() by using getjobtext() rather
than getpermtext().
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 0f4fbb9d2..a80a21967 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -981,25 +981,19 @@ should_ignore_line(Eprog prog)
     }
 
     if (isset(HISTNOSTORE)) {
-	char *b = getpermtext(prog, NULL);
-	char *t = b;
+	char *b = getjobtext(prog, NULL);
 	if (*b == 'b' && strncmp(b, "builtin ", 8) == 0)
 	    b += 8;
 	if (*b == 'h' && strncmp(b, "history", 7) == 0
-	 && (!b[7] || b[7] == ' ')) {
-	    zsfree(t);
+	 && (!b[7] || b[7] == ' '))
 	    return 1;
-	}
 	if (*b == 'f' && b[1] == 'c' && b[2] == ' ' && b[3] == '-') {
 	    b += 3;
 	    do {
-		if (*++b == 'l') {
-		    zsfree(t);
+		if (*++b == 'l')
 		    return 1;
-		}
 	    } while (ialpha(*b));
 	}
-	zsfree(t);
     }
 
     return 0;