about summary refs log tree commit diff
path: root/Src/hashtable.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2001-05-19 09:22:07 +0000
committerWayne Davison <wayned@users.sourceforge.net>2001-05-19 09:22:07 +0000
commit7e17db1fdc5a511d8b4d19f2dc0a3fe2860df760 (patch)
treeb3bb851cd1d02949023db84b18716e93eeab20b8 /Src/hashtable.c
parent90a1316345c1e347908ec29e0b2865a6f03ad4ab (diff)
downloadzsh-7e17db1fdc5a511d8b4d19f2dc0a3fe2860df760.tar.gz
zsh-7e17db1fdc5a511d8b4d19f2dc0a3fe2860df760.tar.xz
zsh-7e17db1fdc5a511d8b4d19f2dc0a3fe2860df760.zip
The function addhistnode() is no longer called for a HIST_TMPSTORE
entry, so I removed the checking for that flag.  Also, freehistdata()
now avoids calling removehashnode() on a HIST_TMPSTORE entry.
Diffstat (limited to 'Src/hashtable.c')
-rw-r--r--Src/hashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index e88bc2477..c75a406e6 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -1480,7 +1480,7 @@ addhistnode(HashTable ht, char *nam, void *nodeptr)
     HashNode oldnode = addhashnode2(ht, nam, nodeptr);
     Histent he = (Histent)nodeptr;
     if (oldnode && oldnode != (HashNode)nodeptr) {
-	if (he->flags & (HIST_MAKEUNIQUE | HIST_TMPSTORE)
+	if (he->flags & HIST_MAKEUNIQUE
 	 || (he->flags & HIST_FOREIGN && (Histent)oldnode == he->up)) {
 	    (void) addhashnode2(ht, oldnode->nam, oldnode); /* restore hash */
 	    he->flags |= HIST_DUP;
@@ -1511,7 +1511,7 @@ freehistdata(Histent he, int unlink)
     if (!he)
 	return;
 
-    if (!(he->flags & HIST_DUP))
+    if (!(he->flags & (HIST_DUP | HIST_TMPSTORE)))
 	removehashnode(histtab, he->text);
 
     zsfree(he->text);