]> granicus.if.org Git - neomutt/commitdiff
boolify mutt_ch_chscmp
authorRichard Russon <rich@flatcap.org>
Wed, 18 Jul 2018 22:13:15 +0000 (23:13 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 19 Jul 2018 09:56:47 +0000 (10:56 +0100)
mutt/charset.c
mutt/charset.h

index ab769145e59ca70147e93ec13dd094a73b1efd09..34c8a9966271617bd8ef33144bdc3faa2c4a1043 100644 (file)
@@ -365,18 +365,18 @@ out:
  * mutt_ch_chscmp - Are the names of two character sets equivalent?
  * @param cs1 First character set
  * @param cs2 Second character set
- * @retval 1 Names are equivalent
- * @retval 0 Names differ
+ * @retval true  Names are equivalent
+ * @retval false Names differ
  *
  * Charsets may have extensions that mutt_ch_canonical_charset() leaves intact;
  * we expect 'cs2' to originate from neomutt code, not user input (i.e. 'cs2'
  * does _not_ have any extension) we simply check if the shorter string is a
  * prefix for the longer.
  */
-int mutt_ch_chscmp(const char *cs1, const char *cs2)
+bool mutt_ch_chscmp(const char *cs1, const char *cs2)
 {
   if (!cs1 || !cs2)
-    return 0;
+    return false;
 
   char buffer[STRING];
 
index f8c8a4391e95922cf18d9f4f431be2eb03e66968..b526094eb64fc1107f47d7ee8528c6da8e5a2862 100644 (file)
@@ -87,7 +87,7 @@ const char *     mutt_ch_charset_lookup(const char *chs);
 int              mutt_ch_check(const char *s, size_t slen, const char *from, const char *to);
 bool             mutt_ch_check_charset(const char *cs, bool strict);
 char *           mutt_ch_choose(const char *fromcode, const char *charsets, char *u, size_t ulen, char **d, size_t *dlen);
-int              mutt_ch_chscmp(const char *cs1, const char *cs2);
+bool             mutt_ch_chscmp(const char *cs1, const char *cs2);
 int              mutt_ch_convert_nonmime_string(char **ps);
 int              mutt_ch_convert_string(char **ps, const char *from, const char *to, int flags);
 int              mutt_ch_fgetconv(struct FgetConv *fc);