From: Thomas Roessler Date: Thu, 2 Mar 2000 09:53:42 +0000 (+0000) Subject: Fix incompatible return value checking. This should fix #29. X-Git-Tag: mutt-1-1-8-rel~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5589923789e4450c40d55ab02b2ae6aabc73aa72;p=mutt Fix incompatible return value checking. This should fix #29. --- diff --git a/mh.c b/mh.c index 32ebf56f..0c8ddf65 100644 --- a/mh.c +++ b/mh.c @@ -718,12 +718,10 @@ static int maildir_sync_message (CONTEXT *ctx, int msgno) int mh_sync_mailbox (CONTEXT * ctx) { char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX]; - int i, j, rc = 0; + int i, j; - i = mh_check_mailbox(ctx, NULL); - - if(i == M_REOPENED || i == M_NEW_MAIL || i < 0) - return i; + if (mh_check_mailbox(ctx, NULL) != 0) + return -1; for (i = 0; i < ctx->msgcount; i++) { @@ -774,7 +772,7 @@ int mh_sync_mailbox (CONTEXT * ctx) } } - return (rc); + return 0; } static char *maildir_canon_filename(char *dest, char *src, size_t l) diff --git a/mx.c b/mx.c index e6375e07..4bb116e3 100644 --- a/mx.c +++ b/mx.c @@ -907,7 +907,7 @@ int mx_close_mailbox (CONTEXT *ctx) if (ctx->changed || ctx->deleted) { - if (sync_mailbox (ctx) == -1) + if (sync_mailbox (ctx) != 0) return -1; } }