return isn't a function FFS
[apps/madmutt.git] / lib-mx / mh.c
index 3e1952b..23d21fe 100644 (file)
@@ -181,7 +181,7 @@ static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt)
     p_delete(tgt);
     close (fd);
     unlink (path);
     p_delete(tgt);
     close (fd);
     unlink (path);
-    return (-1);
+    return -1;
   }
 
   return 0;
   }
 
   return 0;
@@ -803,7 +803,7 @@ static int _mh_read_dir (CONTEXT * ctx, const char *subdir)
 }
 
 static int mh_read_dir (CONTEXT* ctx) {
 }
 
 static int mh_read_dir (CONTEXT* ctx) {
-  return (_mh_read_dir (ctx, NULL));
+  return _mh_read_dir (ctx, NULL);
 }
 
 /* read a maildir style mailbox */
 }
 
 /* read a maildir style mailbox */
@@ -813,7 +813,7 @@ static int maildir_read_dir (CONTEXT * ctx)
    * of the main folder path from which to read messages
    */
   if (_mh_read_dir (ctx, "new") == -1 || _mh_read_dir (ctx, "cur") == -1)
    * of the main folder path from which to read messages
    */
   if (_mh_read_dir (ctx, "new") == -1 || _mh_read_dir (ctx, "cur") == -1)
-    return (-1);
+    return -1;
 
   return 0;
 }
 
   return 0;
 }
@@ -916,7 +916,7 @@ static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr
     p_delete(&msg->path);
     close (fd);
     unlink (path);
     p_delete(&msg->path);
     close (fd);
     unlink (path);
-    return (-1);
+    return -1;
   }
 
   return 0;
   }
 
   return 0;
@@ -1027,7 +1027,7 @@ static int _mh_commit_message (MESSAGE * msg, CONTEXT * ctx, HEADER * hdr,
 
   if ((dirp = opendir (ctx->path)) == NULL) {
     mutt_perror (ctx->path);
 
   if ((dirp = opendir (ctx->path)) == NULL) {
     mutt_perror (ctx->path);
-    return (-1);
+    return -1;
   }
 
   /* figure out what the next message number is */
   }
 
   /* figure out what the next message number is */
@@ -1177,7 +1177,7 @@ static int maildir_sync_message (CONTEXT * ctx, int msgno)
       (h->env && (h->env->refs_changed || h->env->irt_changed))) {
     /* when doing attachment deletion/rethreading, fall back to the MH case. */
     if (mh_rewrite_message (ctx, msgno) != 0)
       (h->env && (h->env->refs_changed || h->env->irt_changed))) {
     /* when doing attachment deletion/rethreading, fall back to the MH case. */
     if (mh_rewrite_message (ctx, msgno) != 0)
-      return (-1);
+      return -1;
   }
   else {
     /* we just have to rename the file. */
   }
   else {
     /* we just have to rename the file. */
@@ -1190,7 +1190,7 @@ static int maildir_sync_message (CONTEXT * ctx, int msgno)
     char *p;
 
     if ((p = strrchr (h->path, '/')) == NULL) {
     char *p;
 
     if ((p = strrchr (h->path, '/')) == NULL) {
-      return (-1);
+      return -1;
     }
     p++;
     m_strcpy(newpath, sizeof(newpath), p);
     }
     p++;
     m_strcpy(newpath, sizeof(newpath), p);
@@ -1216,11 +1216,11 @@ static int maildir_sync_message (CONTEXT * ctx, int msgno)
 
     if (rename (oldpath, fullpath) != 0) {
       mutt_perror ("rename");
 
     if (rename (oldpath, fullpath) != 0) {
       mutt_perror ("rename");
-      return (-1);
+      return -1;
     }
     m_strreplace(&h->path, partpath);
   }
     }
     m_strreplace(&h->path, partpath);
   }
-  return (0);
+  return 0;
 }
 
 static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), int *index_hint)
 }
 
 static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), int *index_hint)
@@ -1229,7 +1229,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)),
   int i, j;
 
 #ifdef USE_HCACHE
   int i, j;
 
 #ifdef USE_HCACHE
-  void *hc = NULL;
+  hcache_t *hc = NULL;
 #endif /* USE_HCACHE */
 
   if (ctx->magic == M_MH)
 #endif /* USE_HCACHE */
 
   if (ctx->magic == M_MH)
@@ -1286,7 +1286,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)),
 
 #ifdef USE_HCACHE
   if (ctx->magic == M_MAILDIR)
 
 #ifdef USE_HCACHE
   if (ctx->magic == M_MAILDIR)
-    mutt_hcache_close (hc);
+    mutt_hcache_close (&hc);
 #endif /* USE_HCACHE */
 
   if (ctx->magic == M_MH)
 #endif /* USE_HCACHE */
 
   if (ctx->magic == M_MH)
@@ -1311,7 +1311,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)),
 err:
 #ifdef USE_HCACHE
   if (ctx->magic == M_MAILDIR)
 err:
 #ifdef USE_HCACHE
   if (ctx->magic == M_MAILDIR)
-    mutt_hcache_close (hc);
+    mutt_hcache_close (&hc);
 #endif /* USE_HCACHE */
   return -1;
 }
 #endif /* USE_HCACHE */
   return -1;
 }