From 202908ec2d79e36a8d68a8d0ad115e1c1ba01288 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 24 Oct 2017 19:08:08 +0100 Subject: [PATCH] fix some types --- imap/command.c | 2 +- imap/imap.c | 4 ++-- imap/imap.h | 2 +- imap/imap_private.h | 4 ++-- imap/utf7.c | 4 ++-- imap/util.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/imap/command.c b/imap/command.c index 9a9e0952f..fd3087e06 100644 --- a/imap/command.c +++ b/imap/command.c @@ -991,7 +991,7 @@ int imap_cmd_step(struct ImapData *idata) * @retval 1 if the command result was OK * @retval 0 if NO or BAD */ -int imap_code(const char *s) +bool imap_code(const char *s) { return cmd_status(s) == IMAP_CMD_OK; } diff --git a/imap/imap.c b/imap/imap.c index 59241fb3e..688dc6b21 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1452,7 +1452,7 @@ int imap_status(char *path, int queue) * * return cached mailbox stats or NULL if create is 0 */ -struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create) +struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, bool create) { struct ImapStatus *status = NULL; #ifdef USE_HCACHE @@ -1551,7 +1551,7 @@ int imap_search(struct Context *ctx, const struct Pattern *pat) return 0; } -int imap_subscribe(char *path, int subscribe) +int imap_subscribe(char *path, bool subscribe) { struct ImapData *idata = NULL; char buf[LONG_STRING]; diff --git a/imap/imap.h b/imap/imap.h index e5d890b8f..c7ba675a2 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -52,7 +52,7 @@ int imap_close_mailbox(struct Context *ctx); int imap_buffy_check(int force, int check_stats); int imap_status(char *path, int queue); int imap_search(struct Context *ctx, const struct Pattern *pat); -int imap_subscribe(char *path, int subscribe); +int imap_subscribe(char *path, bool subscribe); int imap_complete(char *dest, size_t dlen, char *path); int imap_fast_trash(struct Context *ctx, char *dest); diff --git a/imap/imap_private.h b/imap/imap_private.h index 4cdaa3f4e..50a83a42d 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -269,7 +269,7 @@ struct ImapData int imap_check(struct ImapData *idata, int force); int imap_create_mailbox(struct ImapData *idata, char *mailbox); int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname); -struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create); +struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, bool create); void imap_mboxcache_free(struct ImapData *idata); int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post, int flag, int changed, int invert); @@ -289,7 +289,7 @@ int imap_authenticate(struct ImapData *idata); int imap_cmd_start(struct ImapData *idata, const char *cmd); int imap_cmd_step(struct ImapData *idata); void imap_cmd_finish(struct ImapData *idata); -int imap_code(const char *s); +bool imap_code(const char *s); const char *imap_cmd_trailer(struct ImapData *idata); int imap_exec(struct ImapData *idata, const char *cmd, int flags); int imap_cmd_idle(struct ImapData *idata); diff --git a/imap/utf7.c b/imap/utf7.c index 62da77252..073d64785 100644 --- a/imap/utf7.c +++ b/imap/utf7.c @@ -145,7 +145,7 @@ static char *utf7_to_utf8(const char *u7, size_t u7len, char **u8, size_t *u8len bail: FREE(&buf); - return 0; + return NULL; } /** @@ -278,7 +278,7 @@ static char *utf8_to_utf7(const char *u8, size_t u8len, char **u7, size_t *u7len bail: FREE(&buf); - return 0; + return NULL; } void imap_utf_encode(struct ImapData *idata, char **s) diff --git a/imap/util.c b/imap/util.c index 04d6badef..c92bc394a 100644 --- a/imap/util.c +++ b/imap/util.c @@ -836,7 +836,7 @@ int imap_wait_keepalive(pid_t pid) sigset_t oldmask; int rc; - short imap_passive = option(OPT_IMAP_PASSIVE); + bool imap_passive = option(OPT_IMAP_PASSIVE); set_option(OPT_IMAP_PASSIVE); set_option(OPT_KEEP_QUIET); -- 2.40.0