Module Name: src
Committed By: christos
Date: Sat Jul 4 22:45:08 UTC 2015
Modified Files:
src/usr.bin/mail: dotlock.c
Log Message:
fix infinite loop
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/mail/dotlock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/mail/dotlock.c
diff -u src/usr.bin/mail/dotlock.c:1.12 src/usr.bin/mail/dotlock.c:1.13
--- src/usr.bin/mail/dotlock.c:1.12 Sat Jul 4 11:09:49 2015
+++ src/usr.bin/mail/dotlock.c Sat Jul 4 18:45:08 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dotlock.c,v 1.12 2015/07/04 15:09:49 christos Exp $ */
+/* $NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $ */
/*
* Copyright (c) 1996 Christos Zoulas. All rights reserved.
@@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: dotlock.c,v 1.12 2015/07/04 15:09:49 christos Exp $");
+__RCSID("$NetBSD: dotlock.c,v 1.13 2015/07/04 22:45:08 christos Exp $");
#endif
#include "rcv.h"
@@ -86,7 +86,7 @@ create_exclusive(const char *fname)
(void)close(fd);
break;
}
- else if (errno == EEXIST || ntries < 5)
+ else if (errno == EEXIST && ntries < 5)
continue;
else
return -1;