Rewrite encoding checks for 64-bit cleanliness
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 29 Jun 2008 12:47:36 +0000 (12:47 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 29 Jun 2008 12:47:36 +0000 (12:47 +0000)
libcitadel/lib/vnote.c

index a3564eb28067448aa5baba42bba73a2c79ad41f1..b476ccbfa6f60cc5213a5d32d847c650bfa5d285 100644 (file)
@@ -96,9 +96,8 @@ struct vnote *vnote_new_from_str(char *s) {
                                *encoded_value++ = 0;
 
                                /* any qualifiers?  (look for a semicolon) */
-                               is_base64 = (int) bmstrcasestr(thisline, "encoding=base64");
-                               is_quoted_printable = (int) bmstrcasestr(thisline,
-                                                               "encoding=quoted-printable");
+                               is_base64 = bmstrcasestr(thisline, "encoding=base64") ? 1 : 0;
+                               is_quoted_printable = bmstrcasestr(thisline, "encoding=quoted-printable") ? 1 : 0;
 
                                char *semicolon_pos = strchr(thisline, ';');
                                if (semicolon_pos) {