]> granicus.if.org Git - neomutt/commitdiff
boolify imap_set_flags()
authorRichard Russon <rich@flatcap.org>
Fri, 15 Feb 2019 23:09:08 +0000 (23:09 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 16 Feb 2019 14:53:12 +0000 (14:53 +0000)
imap/command.c
imap/imap_private.h
imap/message.c

index c74f19113d8a11fee5733ff93f7909fb81915f7e..a642b444be6148f048b183b0280b5a346cb487ca 100644 (file)
@@ -388,7 +388,7 @@ static void cmd_parse_fetch(struct ImapAccountData *adata, char *s)
   struct Email *e = NULL;
   char *flags = NULL;
   int uid_checked = 0;
-  int server_changes = 0;
+  bool server_changes = false;
 
   struct ImapMboxData *mdata = imap_mdata_get(adata->mailbox);
 
index 5c41a26c9f0ab855a0e76aed88dcb16c94318bbe..c6049ad60f138ea185f1e32db8251058a580fd4d 100644 (file)
@@ -288,7 +288,7 @@ int imap_cmd_idle(struct ImapAccountData *adata);
 void imap_edata_free(void **ptr);
 struct ImapEmailData *imap_edata_get(struct Email *e);
 int imap_read_headers(struct Mailbox *m, unsigned int msn_begin, unsigned int msn_end, bool initial_download);
-char *imap_set_flags(struct Mailbox *m, struct Email *e, char *s, int *server_changes);
+char *imap_set_flags(struct Mailbox *m, struct Email *e, char *s, bool *server_changes);
 int imap_cache_del(struct Mailbox *m, struct Email *e);
 int imap_cache_clean(struct Mailbox *m);
 int imap_append_message(struct Mailbox *m, struct Message *msg);
index 45c8c2e349cdcd318b3512b6428a430f390144ed..42db34b0298495d0fa6db836c453fcfe04ce9e54 100644 (file)
@@ -652,7 +652,7 @@ static void imap_fetch_msn_seqset(struct Buffer *b, struct ImapAccountData *adat
  * @param[in]  m              Mailbox
  * @param[in]  e              Email
  * @param[in]  local_changes  Has the local mailbox been changed?
- * @param[out] server_changes Set to 1 if the flag has changed
+ * @param[out] server_changes Set to true if the flag has changed
  * @param[in]  flag_name      Flag to check, e.g. #MUTT_FLAG
  * @param[in]  old_hd_flag    Old header flags
  * @param[in]  new_hd_flag    New header flags
@@ -663,7 +663,7 @@ static void imap_fetch_msn_seqset(struct Buffer *b, struct ImapAccountData *adat
  * made.
  */
 static void set_changed_flag(struct Mailbox *m, struct Email *e,
-                             int local_changes, int *server_changes, int flag_name,
+                             int local_changes, bool *server_changes, int flag_name,
                              int old_hd_flag, int new_hd_flag, int h_flag)
 {
   /* If there are local_changes, we only want to note if the server
@@ -678,7 +678,7 @@ static void set_changed_flag(struct Mailbox *m, struct Email *e,
     return;
 
   if (server_changes)
-    *server_changes = 1;
+    *server_changes = true;
 
   /* Local changes have priority */
   if (!local_changes)
@@ -1749,7 +1749,7 @@ int imap_cache_clean(struct Mailbox *m)
  * @param[in]  m              Imap Selected Mailbox
  * @param[in]  e              Email
  * @param[in]  s              Command string
- * @param[out] server_changes Flags have changed
+ * @param[out] server_changes Set to true if the flags have changed
  * @retval ptr  The end of flags string
  * @retval NULL Failure
  *
@@ -1762,7 +1762,7 @@ int imap_cache_clean(struct Mailbox *m)
  * case of e->changed, if a change to a flag _would_ have been
  * made.
  */
-char *imap_set_flags(struct Mailbox *m, struct Email *e, char *s, int *server_changes)
+char *imap_set_flags(struct Mailbox *m, struct Email *e, char *s, bool *server_changes)
 {
   struct ImapAccountData *adata = imap_adata_get(m);
   if (!adata || adata->mailbox != m)