Pull strict-aliasing fix for sockaddr_46.
[exim.git] / src / src / mime.c
index 7b3ec2580fce335ebbadbd8b91dddc7dbe68516b..bc2d2f08aeba64a6d1f1f72f3e843e2f4dda0ed6 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/mime.c,v 1.18 2009/11/09 14:31:24 tom Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
@@ -23,9 +21,9 @@ uschar *mime_current_boundary = NULL;
    give info on detected "problems" in MIME
    encodings. Those are defined in mime.h. */
 
-void mime_set_anomaly(int level, char *text) {
+void mime_set_anomaly(int level, const char *text) {
   mime_anomaly_level = level;
-  mime_anomaly_text = US text;
+  mime_anomaly_text = CUS text;
 }
 
 
@@ -106,7 +104,7 @@ static int mime_decode_base64(FILE* in, FILE* out, uschar* boundary)
 
   opos = obuf;
 
-  while (fgets((char *)ibuf, MIME_MAX_LINE_LENGTH, in) != NULL)
+  while (Ufgets(ibuf, MIME_MAX_LINE_LENGTH, in) != NULL)
   {
     if (boundary != NULL
       && Ustrncmp(ibuf, "--", 2) == 0
@@ -153,7 +151,7 @@ static int mime_decode_base64(FILE* in, FILE* out, uschar* boundary)
         return -1; /* error */
       size += len;
       /* copy incomplete last byte to start of obuf, where we continue */
-      if (bytestate & 3 != 0)
+      if ((bytestate & 3) != 0)
         *obuf = *opos;
       opos = obuf;
     }