Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mail fix infinite loop



details:   https://anonhg.NetBSD.org/src/rev/d0ffb42b201b
branches:  trunk
changeset: 339207:d0ffb42b201b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 04 22:45:08 2015 +0000

description:
fix infinite loop

diffstat:

 usr.bin/mail/dotlock.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5c3990d531ab -r d0ffb42b201b usr.bin/mail/dotlock.c
--- a/usr.bin/mail/dotlock.c    Sat Jul 04 22:39:23 2015 +0000
+++ b/usr.bin/mail/dotlock.c    Sat Jul 04 22:45:08 2015 +0000
@@ -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 @@
                        (void)close(fd);
                        break;
                }
-               else if (errno == EEXIST || ntries < 5)
+               else if (errno == EEXIST && ntries < 5)
                        continue;
                else
                        return -1;



Home | Main Index | Thread Index | Old Index