summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-02 20:29:30 +0000
committerJune McEnroe <june@causal.agency>2021-10-02 20:29:30 +0000
commitaa585126cc9de9e7f50dc2cc8a26c7025a8c0e09 (patch)
treef8894043d0ac4ff22fd097cc40334b16ced23f80
parentCheck sizes of mailboxes, not times (diff)
downloadsrc-aa585126cc9de9e7f50dc2cc8a26c7025a8c0e09.tar.gz
src-aa585126cc9de9e7f50dc2cc8a26c7025a8c0e09.zip
Fix chkmail loop break condition
padvance_magic() returns -1 when there are no more paths left, not
zero.
Diffstat (limited to '')
-rw-r--r--bin/dash/src/mail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/dash/src/mail.c b/bin/dash/src/mail.c
index e6baaa1b..ec5bd103 100644
--- a/bin/dash/src/mail.c
+++ b/bin/dash/src/mail.c
@@ -80,7 +80,7 @@ chkmail(void)
 		int len;
 
 		len = padvance_magic(&mpath, nullstr, 2);
-		if (!len)
+		if (len == -1)
 			break;
 		p = stackblock();
 		if (*p == '\0')