]> mj.ucw.cz Git - maildups.git/blobdiff - mdup.c
Silence a couple of signedness warnings
[maildups.git] / mdup.c
diff --git a/mdup.c b/mdup.c
index 0d3554179f73ac0d0e8fe8bb0952381279b32680..7f96bfa8c491f17fa80866e09415ec42258f6bf4 100644 (file)
--- a/mdup.c
+++ b/mdup.c
@@ -18,6 +18,8 @@
 
 #include "util.h"
 
+const char progname[] = "mdup";
+
 static char *db_name;
 static uns max_age = 86400;
 static uns now;
@@ -216,7 +218,7 @@ parse_header_line(char *line, uns cnt, struct item *item)
       uns lul = strlen(local_user);
       if (!strcasecmp(rhs, local_domain) &&
          !strncasecmp(lhs, local_user, lul) &&
-         !strncasecmp(lhs+lul, "+md+", 4))
+         !strncasecmp(lhs+lul, "+md-", 4))
        {
          verb(1, "Detected local Message-ID");
          item->timestamp = 2;
@@ -226,8 +228,8 @@ parse_header_line(char *line, uns cnt, struct item *item)
 
   struct sha1_ctx ctx;
   sha1_init(&ctx);
-  sha1_update(&ctx, lhs, l-lhs);
-  sha1_update(&ctx, rhs, r-rhs);
+  sha1_update(&ctx, (unsigned char *) lhs, l-lhs);
+  sha1_update(&ctx, (unsigned char *) rhs, r-rhs);
   sha1_final(&ctx, item->digest);
   item->timestamp = 1;
   if (verbose >= 1)