about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 6ddfaf506..d4f3fc454 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2225,6 +2225,7 @@ savehistfile(char *fn, int err, int writeflags)
 	}
     }
     if (out) {
+	ret = 0;
 	for (; he && he->histnum <= xcurhist; he = down_histent(he)) {
 	    if ((writeflags & HFILE_SKIPDUPS && he->node.flags & HIST_DUP)
 	     || (writeflags & HFILE_SKIPFOREIGN && he->node.flags & HIST_FOREIGN)