summaryrefslogtreecommitdiff
path: root/bin/ksh/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/history.c')
-rw-r--r--bin/ksh/history.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/history.c b/bin/ksh/history.c
index 1448f8abc58..a3a8b60cc76 100644
--- a/bin/ksh/history.c
+++ b/bin/ksh/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.81 2018/11/20 07:02:23 martijn Exp $ */
+/* $OpenBSD: history.c,v 1.82 2019/06/28 13:34:59 deraadt Exp $ */
/*
* command history
@@ -252,7 +252,7 @@ c_fc(char **wp)
return 1;
}
- n = fstat(shf->fd, &statb) < 0 ? 128 :
+ n = fstat(shf->fd, &statb) == -1 ? 128 :
statb.st_size + 1;
Xinit(xs, xp, n, hist_source->areap);
while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) {