Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/vacation reverse logic in from test; from wiz



details:   https://anonhg.NetBSD.org/src/rev/b9743ebf5aab
branches:  trunk
changeset: 565297:b9743ebf5aab
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 03 23:57:32 2004 +0000

description:
reverse logic in from test; from wiz

diffstat:

 usr.bin/vacation/vacation.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (48 lines):

diff -r 9d35f6c96907 -r b9743ebf5aab usr.bin/vacation/vacation.c
--- a/usr.bin/vacation/vacation.c       Sat Apr 03 23:56:49 2004 +0000
+++ b/usr.bin/vacation/vacation.c       Sat Apr 03 23:57:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vacation.c,v 1.25 2004/04/03 20:55:13 christos Exp $   */
+/*     $NetBSD: vacation.c,v 1.26 2004/04/03 23:57:32 christos Exp $   */
 
 /*
  * Copyright (c) 1983, 1987, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94";
 #endif
-__RCSID("$NetBSD: vacation.c,v 1.25 2004/04/03 20:55:13 christos Exp $");
+__RCSID("$NetBSD: vacation.c,v 1.26 2004/04/03 23:57:32 christos Exp $");
 #endif /* not lint */
 
 /*
@@ -248,8 +248,8 @@
                        cont = 0;
                        if (!strncmp(buf, "From ", 5))
                                getfrom(buf + 5);
-                       if ((fflag & FROM_FROM) == 0 ||
-                           strncmp(buf, "From:", 5))
+                       if ((fflag & FROM_FROM) != 0 &&
+                           strncmp(buf, "From:", 5) == 0)
                                getfrom(buf + 5);
                        break;
                case 'P':               /* "Precedence:" */
@@ -293,14 +293,14 @@
                        goto findme;
                case 'R':               /* "Return-Path:" */
                        cont = 0;
-                       if ((fflag & RETURN_PATH_FROM) == 0 ||
-                           strncmp(buf, "Return-Path:", 12))
+                       if ((fflag & RETURN_PATH_FROM) != 0 &&
+                           strncmp(buf, "Return-Path:", 12) == 0)
                                getfrom(buf + 12);
                        break;
                case 'S':               /* "Sender:" */
                        cont = 0;
-                       if ((fflag & SENDER_FROM) == 0 ||
-                           strncmp(buf, "Sender:", 7))
+                       if ((fflag & SENDER_FROM) != 0 &&
+                           strncmp(buf, "Sender:", 7) == 0)
                                getfrom(buf + 7);
                        break;
                default:



Home | Main Index | Thread Index | Old Index