diff options
author | 2008-07-16 15:14:33 +0000 | |
---|---|---|
committer | 2008-07-16 15:14:33 +0000 | |
commit | b6ac7d8517b5f58882b700dc56ae5c12020d0888 (patch) | |
tree | 4583d2808c59a317ad45b8b868d11ae18a7f0ca6 | |
parent | add -E flag and 'skipempty' option to skip sending messages with (diff) | |
download | wireguard-openbsd-b6ac7d8517b5f58882b700dc56ae5c12020d0888.tar.xz wireguard-openbsd-b6ac7d8517b5f58882b700dc56ae5c12020d0888.zip |
'no subject' check is never triggered. check if it's actually empty
ok millert@
-rw-r--r-- | usr.bin/mail/send.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c index cfe041d8344..0b345b86aa2 100644 --- a/usr.bin/mail/send.c +++ b/usr.bin/mail/send.c @@ -1,4 +1,4 @@ -/* $OpenBSD: send.c,v 1.20 2008/07/16 15:11:16 martynas Exp $ */ +/* $OpenBSD: send.c,v 1.21 2008/07/16 15:14:33 martynas Exp $ */ /* $NetBSD: send.c,v 1.6 1996/06/08 19:48:39 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)send.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: send.c,v 1.20 2008/07/16 15:11:16 martynas Exp $"; +static const char rcsid[] = "$OpenBSD: send.c,v 1.21 2008/07/16 15:14:33 martynas Exp $"; #endif #endif /* not lint */ @@ -341,7 +341,7 @@ mail1(struct header *hp, int printheaders) if (fsize(mtf) == 0) { if (value("skipempty") != NULL) goto out; - if (hp->h_subject == NULL) + if (hp->h_subject == NULL || *hp->h_subject == '\0') puts("No message, no subject; hope that's ok"); else puts("Null message body; hope that's ok"); |