From 2127cfb6ecf7f44a44e1b04ff91afcd731b09633 Mon Sep 17 00:00:00 2001 From: Anton Rieger Date: Mon, 25 Sep 2017 02:04:53 +0200 Subject: [PATCH] bool: convert function parameters in bcache.h * mutt_bcache_put() --- bcache.c | 2 +- bcache.h | 3 ++- imap/message.c | 2 +- nntp.c | 2 +- pop.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bcache.c b/bcache.c index c28e9eb1f..509d688cf 100644 --- a/bcache.c +++ b/bcache.c @@ -150,7 +150,7 @@ FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id) return fp; } -FILE *mutt_bcache_put(struct BodyCache *bcache, const char *id, int tmp) +FILE *mutt_bcache_put(struct BodyCache *bcache, const char *id, bool tmp) { char path[LONG_STRING]; struct stat sb; diff --git a/bcache.h b/bcache.h index 63a65f250..3ee9003d4 100644 --- a/bcache.h +++ b/bcache.h @@ -24,6 +24,7 @@ #ifndef _MUTT_BCACHE_H #define _MUTT_BCACHE_H +#include #include struct Account; @@ -67,7 +68,7 @@ FILE *mutt_bcache_get(struct BodyCache *bcache, const char *id); * @retval FILE* on success * @retval NULL on failure */ -FILE *mutt_bcache_put(struct BodyCache *bcache, const char *id, int tmp); +FILE *mutt_bcache_put(struct BodyCache *bcache, const char *id, bool tmp); /** * mutt_bcache_commit - Move a temporary file into the Body Cache diff --git a/imap/message.c b/imap/message.c index ef0711769..e04aae051 100644 --- a/imap/message.c +++ b/imap/message.c @@ -109,7 +109,7 @@ static FILE *msg_cache_put(struct ImapData *idata, struct Header *h) idata->bcache = msg_cache_open(idata); snprintf(id, sizeof(id), "%u-%u", idata->uid_validity, HEADER_DATA(h)->uid); - return mutt_bcache_put(idata->bcache, id, 1); + return mutt_bcache_put(idata->bcache, id, true); } static int msg_cache_commit(struct ImapData *idata, struct Header *h) diff --git a/nntp.c b/nntp.c index 725b6340b..07ba52629 100644 --- a/nntp.c +++ b/nntp.c @@ -1618,7 +1618,7 @@ static int nntp_open_message(struct Context *ctx, struct Message *msg, int msgno /* create new cache file */ mutt_message(fetch_msg); - msg->fp = mutt_bcache_put(nntp_data->bcache, article, 1); + msg->fp = mutt_bcache_put(nntp_data->bcache, article, true); if (!msg->fp) { mutt_mktemp(buf, sizeof(buf)); diff --git a/pop.c b/pop.c index 6d1cc1e49..405ae0d2b 100644 --- a/pop.c +++ b/pop.c @@ -599,7 +599,7 @@ static int pop_fetch_message(struct Context *ctx, struct Message *msg, int msgno NetInc, h->content->length + h->content->offset - 1); /* see if we can put in body cache; use our cache as fallback */ - if (!(msg->fp = mutt_bcache_put(pop_data->bcache, h->data, 1))) + if (!(msg->fp = mutt_bcache_put(pop_data->bcache, h->data, true))) { /* no */ bcache = 0; -- 2.40.0