From: Brendan Cully Date: Fri, 14 Jul 2017 05:05:28 +0000 (-0700) Subject: drop unused flags argument from imap_access X-Git-Tag: neomutt-20170714~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e24d3cb31fc8e991acb07b9e9bb5b0e2551ced23;p=neomutt drop unused flags argument from imap_access We are not using an actual interface so it is pointless. --- diff --git a/imap/imap.c b/imap/imap.c index 2b064a4c2..670e3d549 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -71,7 +71,7 @@ static void imap_set_flag(struct ImapData *idata, int aclbit, int flag, /* imap_access: Check permissions on an IMAP mailbox. * TODO: ACL checks. Right now we assume if it exists we can * mess with it. */ -int imap_access(const char *path, int flags) +int imap_access(const char *path) { struct ImapData *idata = NULL; struct ImapMbox mx; @@ -820,8 +820,7 @@ static int imap_open_mailbox_append(struct Context *ctx, int flags) strfcpy(mailbox, "INBOX", sizeof(mailbox)); FREE(&mx.mbox); - /* really we should also check for W_OK */ - if ((rc = imap_access(ctx->path, F_OK)) == 0) + if ((rc = imap_access(ctx->path)) == 0) return 0; if (rc == -1) diff --git a/imap/imap.h b/imap/imap.h index 9938ab6bc..f264fa18f 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -37,7 +37,7 @@ struct ImapMbox }; /* imap.c */ -int imap_access(const char *path, int flags); +int imap_access(const char *path); int imap_check_mailbox(struct Context *ctx, int force); int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx); int imap_sync_mailbox(struct Context *ctx, int expunge); diff --git a/mx.c b/mx.c index 638d67e62..45e374ee9 100644 --- a/mx.c +++ b/mx.c @@ -457,7 +457,7 @@ int mx_access(const char *path, int flags) { #ifdef USE_IMAP if (mx_is_imap(path)) - return imap_access(path, flags); + return imap_access(path); #endif return access(path, flags);