X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fdropsbr.c;h=868127769329f388245b5af04025d5ce9e11984e;hb=d3ba09a465cb0e5fc9a74d0b152a7ed965f895cb;hp=cc668cdb7a3c4f95db3fd4c5072f14145af72c55;hpb=b0b1dd37ff515578cf7cba51625189eb34a196cb;p=mmh diff --git a/uip/dropsbr.c b/uip/dropsbr.c index cc668cd..8681277 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -156,7 +156,7 @@ mbx_chk_mmdf(int fd) ldelim[count] = 0; - if (strcmp(ldelim, mmdlm2) && write(fd, "\n", 1) != 1 + if (strcmp(ldelim, mmdlm2)!=0 && write(fd, "\n", 1) != 1 && write(fd, mmdlm2, count) != count) return NOTOK; @@ -361,7 +361,7 @@ mbx_copy(char *mailbox, int mbx_style, int md, int fd, int mapping, ** Change the "Return-Path:" field ** (if in first line) back to "From ". */ - if (!strncmp(buffer, "Return-Path:", 12)) { + if (strncmp(buffer, "Return-Path:", 12)==0) { char tmpbuffer[BUFSIZ]; char *tp, *ep, *fp; @@ -372,8 +372,8 @@ mbx_copy(char *mailbox, int mbx_style, int md, int fd, int mapping, fp = strchr(ep + 1, '\n'); tp = dctime(dlocaltimenow()); snprintf(buffer, sizeof(buffer), "From %.*s %s", (int)(fp - ep), ep, tp); - } else if (!strncmp(buffer, "X-Envelope-From:", - 16)) { + } else if (strncmp(buffer, "X-Envelope-From:", + 16)==0) { /* ** Change the "X-Envelope-From:" ** field (if first line) back @@ -387,7 +387,7 @@ mbx_copy(char *mailbox, int mbx_style, int md, int fd, int mapping, ep = tmpbuffer + 17; snprintf(buffer, sizeof(buffer), "From %s", ep); - } else if (strncmp(buffer, "From ", 5)) { + } else if (strncmp(buffer, "From ", 5)!=0) { /* ** If there is already a "From " ** line, then leave it alone.