X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c066b395274021182a5f0530ccfeb1bcd167d860..9059a312f2a452fa31885d90eeda105404ee9ada:/uip/dropsbr.c diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 8cc07cb0..630de111 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -5,22 +5,17 @@ * complete copyright information. */ -#include -#include -#include -#include -#include -#include -#include "../sbr/lock_file.h" -#include "../sbr/m_mktemp.h" - -#ifdef NTOHLSWAP -# include -#else -# undef ntohl -# define ntohl(n) (n) -#endif - +#include "h/nmh.h" +#include "h/mh.h" +#include "sbr/dtime.h" +#include "sbr/strindex.h" +#include "sbr/error.h" +#include "h/utils.h" +#include "h/dropsbr.h" +#include "h/mts.h" +#include "h/tws.h" +#include "sbr/lock_file.h" +#include "sbr/m_mktemp.h" #include /* @@ -195,7 +190,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd, if (write (md, MMDF_DELIM, j) != j) return NOTOK; - return (i != NOTOK ? OK : NOTOK); + return i == NOTOK ? NOTOK : OK; case MBOX_FORMAT: if ((j = dup (fd)) == NOTOK) @@ -252,7 +247,7 @@ mbx_copy (char *mailbox, int mbx_style, int md, int fd, * If there is already a "From " line, * then leave it alone. Else we add one. */ - char tmpbuffer[sizeof buffer]; + char tmpbuffer[sizeof buffer-7]; char *tp, *ep; strncpy(tmpbuffer, buffer, sizeof(tmpbuffer));