Source-Changes-HG archive

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

[src/netbsd-7-0]: src/libexec/mail.local Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/16c3d92849ee
branches:  netbsd-7-0
changeset: 801202:16c3d92849ee
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jul 21 12:55:26 2016 +0000

description:
Pull up following revision(s) (requested by shm in ticket #1207):
        libexec/mail.local/mail.local.c: revision 1.28
Fix error checks in open(2) calls.

diffstat:

 libexec/mail.local/mail.local.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r fde056f92f2c -r 16c3d92849ee libexec/mail.local/mail.local.c
--- a/libexec/mail.local/mail.local.c   Tue Jul 19 14:16:49 2016 +0000
+++ b/libexec/mail.local/mail.local.c   Thu Jul 21 12:55:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mail.local.c,v 1.26.22.1 2016/07/19 14:12:10 martin Exp $      */
+/*     $NetBSD: mail.local.c,v 1.26.22.2 2016/07/21 12:55:26 martin Exp $      */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -36,7 +36,7 @@
 #if 0
 static char sccsid[] = "@(#)mail.local.c       8.22 (Berkeley) 6/21/95";
 #else
-__RCSID("$NetBSD: mail.local.c,v 1.26.22.1 2016/07/19 14:12:10 martin Exp $");
+__RCSID("$NetBSD: mail.local.c,v 1.26.22.2 2016/07/21 12:55:26 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -218,10 +218,10 @@
        }
        
        if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK,
-           S_IRUSR|S_IWUSR)) != -1) {
+           S_IRUSR|S_IWUSR)) == -1) {
                /* create file */
                if ((mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK,
-                   S_IRUSR|S_IWUSR)) != -1) {
+                   S_IRUSR|S_IWUSR)) == -1) {
                        logwarn("%s: %s", path, strerror(errno));
                        rval = EX_OSERR;
                        goto bad;



Home | Main Index | Thread Index | Old Index