]> granicus.if.org Git - neomutt/commitdiff
check_msg
authorRichard Russon <rich@flatcap.org>
Mon, 10 Apr 2017 23:32:39 +0000 (00:32 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 12 Apr 2017 01:01:42 +0000 (02:01 +0100)
recvcmd.c

index ac5bbe359312f28488a2d2dd1e475ba54dd83bd6..4c3698355fa4b13762a86659838679cd4225da61 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
 /* some helper functions to verify that we are exclusively operating
  * on message/rfc822 attachments
  */
-static short check_msg (BODY * b, short err)
+static bool check_msg (BODY * b, bool err)
 {
   if (!mutt_is_message_type (b->type, b->subtype))
   {
     if (err)
       mutt_error (_("You may only bounce message/rfc822 parts."));
-    return -1;
+    return false;
   }
-  return 0;
+  return true;
 }
 
 static bool check_all_msg (ATTACHPTR ** idx, short idxlen,
@@ -44,7 +44,7 @@ static bool check_all_msg (ATTACHPTR ** idx, short idxlen,
 {
   short i;
 
-  if (cur && check_msg (cur, err) == -1)
+  if (cur && !check_msg (cur, err))
     return false;
   else if (!cur)
   {
@@ -52,7 +52,7 @@ static bool check_all_msg (ATTACHPTR ** idx, short idxlen,
     {
       if (idx[i]->content->tagged)
       {
-       if (check_msg (idx[i]->content, err) == -1)
+       if (!check_msg (idx[i]->content, err))
          return false;
       }
     }