]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/mime_parser.c
FDIOBuffer: wrong member type; thus we need increase the library version again.
[citadel.git] / libcitadel / lib / mime_parser.c
index 986c305442c07554a3a3fcab9a653637fc5cf106..fe06347a5b8a2b7ebf9e91715fbb0eed0cedd0b4 100644 (file)
@@ -178,7 +178,6 @@ int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) {
                        }
                        else
                        {
-                               ch = 0;
                                ch = _decode_hex(&encoded[pos]);
                                pos += 2;
                                decoded[decoded_length++] = ch;
@@ -626,16 +625,14 @@ static void recurseable_mime_parser(char *partnum,
                /* Figure out where the boundaries are */
                m->b[startary].len = snprintf(m->b[startary].Key, SIZ, "--%s", m->b[boundary].Key);
                SubMimeHeaders = InitInterestingMimes ();
-               if (*ptr == '\r')
-                       ptr ++;
-               if (*ptr == '\n')
-                       ptr ++;
+
+               while ((*ptr == '\r') || (*ptr == '\n')) ptr ++;
+
                if (strncmp(ptr, m->b[startary].Key, m->b[startary].len) == 0)
                        ptr += m->b[startary].len;
-               if (*ptr == '\r')
-                       ptr ++;
-               if (*ptr == '\n')
-                       ptr ++;
+
+               while ((*ptr == '\r') || (*ptr == '\n')) ptr ++;
+
                part_start = NULL;
                do {
                        char *optr;