From: epg <> Date: Sun, 25 Aug 2002 07:39:04 +0000 (+0000) Subject: (strip_from): DOH! This will teach me to code at 2:30 in the middle X-Git-Url: https://diplodocus.org/git/mdeliver/commitdiff_plain/35033ce2fc87a1d3bf12afda011cac02dcd4609e?hp=fbff2001548557e8bfcddde282c90f19cb020ae2 (strip_from): DOH! This will teach me to code at 2:30 in the middle of the night. Use strncmp(3) correctly. --- diff --git a/mdeliver.c b/mdeliver.c index fb266d7..b0a7091 100644 --- a/mdeliver.c +++ b/mdeliver.c @@ -133,7 +133,7 @@ strip_from(int fd, char *buf, char *fn) 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') {