From 35033ce2fc87a1d3bf12afda011cac02dcd4609e Mon Sep 17 00:00:00 2001 From: epg <> Date: Sun, 25 Aug 2002 07:39:04 +0000 Subject: [PATCH] (strip_from): DOH! This will teach me to code at 2:30 in the middle of the night. Use strncmp(3) correctly. --- mdeliver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') { -- 2.56.0