#include <h/mh.h>
#include <fcntl.h>
+#include <h/utils.h>
#include <h/md5.h>
#include <h/mts.h>
#include <h/tws.h>
* headers (since it has no body).
*/
if (ct->c_ctexbody) {
- if (boundary && *boundary != '\0')
+ if (*boundary != '\0')
free(boundary);
return OK;
}
fprintf (out, "\n--%s\n", boundary);
if (output_content (p, out) == NOTOK) {
- if (boundary && *boundary != '\0')
+ if (*boundary != '\0')
free(boundary);
return NOTOK;
}
break;
}
- if (boundary && *boundary != '\0')
+ if (*boundary != '\0')
free(boundary);
return result;
* 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;