]> diplodocus.org Git - mdeliver/commitdiff
(strip_from): DOH! This will teach me to code at 2:30 in the middle
authorepg <>
Sun, 25 Aug 2002 07:39:04 +0000 (07:39 +0000)
committerepg <>
Sun, 25 Aug 2002 07:39:04 +0000 (07:39 +0000)
of the night.  Use strncmp(3) correctly.

mdeliver.c

index fb266d725943706d707453d13808330adf40edb1..b0a7091628a1ef227ebcd3c61d9b7d30239dc301 100644 (file)
@@ -133,7 +133,7 @@ strip_from(int fd, char *buf, char *fn)
         err(EX_TEMPFAIL, "Failed read from stdin");
     }
 
         err(EX_TEMPFAIL, "Failed read from stdin");
     }
 
-    if (strncmp(buf, "From ", 5)) {
+    if (strncmp(buf, "From ", 5) == 0) {
         while ((r = read(STDIN_FILENO, buf, 1)) > 0
                || (r == -1 && errno == EINTR)) {
             if (buf[0] == '\n') {
         while ((r = read(STDIN_FILENO, buf, 1)) > 0
                || (r == -1 && errno == EINTR)) {
             if (buf[0] == '\n') {