]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
mlmmj-receive-strip: kill duplicated code
authorBaptiste Daroussin <bapt@FreeBSD.org>
Sat, 15 Apr 2023 19:27:41 +0000 (21:27 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Sat, 15 Apr 2023 19:27:41 +0000 (21:27 +0200)
contrib/receivestrip/mlmmj-receive-strip.c

index 49f0e20120cd9c3009822d45a0c0213cc779d524..7811d9bf38535708d5acc939694f008074f797cc 100644 (file)
@@ -47,6 +47,7 @@
 #include "ctrlvalue.h"
 #include "ctrlvalues.h"
 #include "utils.h"
+#include "do_all_the_voodoo_here.h"
 
 #include "log_error.h"
 #include "wrappers.h"
 
 #define UNWANTED_MIME_HDR "X-ThisMailContainsUnwantedMimeParts: N\n"
 
-static int findit(char *line, strlist *headers)
-{
-       size_t len;
-
-       if (headers == NULL)
-               return (0);
-
-       tll_foreach(*headers, hdr) {
-               len = strlen(hdr->item);
-               if(strncasecmp(line, hdr->item, len) == 0)
-                       return 1;
-       }
-
-       return 0;
-}
-
 /* extract mime_type and boundary from the Content-Type header
  * allocates a string for the mime_type if one is found
  * always allocates a boundarie (using "--" when none is found)