From: Scott Snyder Date: Wed, 15 Dec 2010 21:17:52 +0000 (+0100) Subject: propagate and check return status of close() in slocal X-Git-Tag: mmh-start~16 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=119362982fae61ae7aaa899eaf2544e4f4a84283;p=mmh propagate and check return status of close() in slocal --- diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 3bd5c9b..76bc00d 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -467,8 +467,9 @@ mbx_size (int md, off_t start, off_t stop) int mbx_close (char *mailbox, int md) { - lkclose (md, mailbox); - return OK; + if (lkclose (md, mailbox) == 0) + return OK; + return NOTOK; } diff --git a/uip/slocal.c b/uip/slocal.c index 37173f6..e6880fe 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -1065,7 +1065,11 @@ usr_file (int fd, char *mailbox, int mbx_style) } /* close and unlock file */ - mbx_close (mailbox, md); + if (mbx_close (mailbox, md) == NOTOK) { + if (verbose) + adorn ("", "error closing:"); + return -1; + } if (verbose) verbose_printf (", success.\n");