diff options
author | 2010-05-20 18:35:33 +0000 | |
---|---|---|
committer | 2010-05-20 18:35:33 +0000 | |
commit | 27b448e364caeef558a873b53010c5edc2dc3954 (patch) | |
tree | 62b33a3369ad2524204342a71220cf6c812add3d | |
parent | remove unused variable. fallout from previous. (diff) | |
download | wireguard-openbsd-27b448e364caeef558a873b53010c5edc2dc3954.tar.xz wireguard-openbsd-27b448e364caeef558a873b53010c5edc2dc3954.zip |
S_ISREG() should be called on st.st_mode not st.st_flags
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 235000342dd..ca9adb45356 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.103 2010/05/09 15:24:49 gilles Exp $ */ +/* $OpenBSD: smtpd.c,v 1.104 2010/05/20 18:35:33 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -962,7 +962,7 @@ forkmda(struct smtpd *env, struct imsgev *iev, u_int32_t id, error("open"); if (fstat(fd, &sb) < 0) error("fstat"); - if (S_ISREG(sb.st_flags) && flock(fd, LOCK_EX) < 0) + if (S_ISREG(sb.st_mode) && flock(fd, LOCK_EX) < 0) error("flock"); fp = fdopen(fd, "a"); if (fp == NULL) |