]> diplodocus.org Git - nmh/blobdiff - uip/mhoutsbr.c
Use result, because (void) didn't prevent warning on FreeBSD 10.
[nmh] / uip / mhoutsbr.c
index c99744565730ba290226c1504c0dbcbfd5f9cfbf..ea45a628b05341952ffa8a7915992c9849744beb 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <h/mh.h>
 #include <fcntl.h>
+#include <h/utils.h>
 #include <h/md5.h>
 #include <h/mts.h>
 #include <h/tws.h>
@@ -96,7 +97,7 @@ output_content (CT ct, FILE *out)
      * headers (since it has no body).
      */
     if (ct->c_ctexbody) {
-       if (boundary && *boundary != '\0')
+       if (*boundary != '\0')
            free(boundary);
        return OK;
     }
@@ -116,7 +117,7 @@ output_content (CT ct, FILE *out)
        m = (struct multipart *) ct->c_ctparams;
 
         if (m->mp_content_before) {
-           fprintf (out, "%s", m->mp_content_before);
+           fputs(m->mp_content_before, out);
         }
 
        for (part = m->mp_parts; part; part = part->mp_next) {
@@ -124,7 +125,7 @@ output_content (CT ct, FILE *out)
 
            fprintf (out, "\n--%s\n", boundary);
            if (output_content (p, out) == NOTOK) {
-               if (boundary && *boundary != '\0')
+               if (*boundary != '\0')
                    free(boundary);
                 return NOTOK;
            }
@@ -132,7 +133,7 @@ output_content (CT ct, FILE *out)
        fprintf (out, "\n--%s--\n", boundary);
 
         if (m->mp_content_after) {
-           fprintf (out, "%s", m->mp_content_after);
+           fputs(m->mp_content_after, out);
         }
     }
     break;
@@ -205,7 +206,7 @@ output_content (CT ct, FILE *out)
        break;
     }
 
-    if (boundary && *boundary != '\0')
+    if (*boundary != '\0')
        free(boundary);
 
     return result;
@@ -365,7 +366,7 @@ writeQuoted (CT ct, FILE *out)
         * doesn't falsely match an mbox delimiter.
         */
        cp = bufp;
-       if (gotlen >= 5 && strncmp (cp, "From ", 5) == 0) {
+       if (gotlen >= 5 && HasPrefix(cp, "From ")) {
            fprintf (out, "=%02X", 'F');
            cp++;
            n += 3;