]> diplodocus.org Git - nmh/blobdiff - uip/refile.c
Fixed removal of <> in test-dist and test-rcvdist.
[nmh] / uip / refile.c
index 205041e0501fab4edce906dab6eebd6aab506aa0..3afd0d6d8cb1bae8ae7b54477e1c8bba02e16058 100644 (file)
@@ -11,7 +11,6 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <fcntl.h>
-#include <errno.h>
 
 #define REFILE_SWITCHES \
     X("draft", 0, DRAFTSW) \
@@ -385,11 +384,13 @@ static void
 copy_seqs (struct msgs *oldmp, int oldmsgnum, struct msgs *newmp, int newmsgnum)
 {
     char **seq;
-    int seqnum;
+    size_t seqnum;
 
-    for (seq = oldmp->msgattrs, seqnum = 0; *seq; ++seq, ++seqnum) {
+    for (seq = svector_strs (oldmp->msgattrs), seqnum = 0;
+        *seq && seqnum < svector_size (oldmp->msgattrs);
+        ++seq, ++seqnum) {
        if (strcmp (current, *seq)) {
-           assert (seqnum == seq_getnum (oldmp, *seq));
+           assert ((int) seqnum == seq_getnum (oldmp, *seq));
            if (in_sequence (oldmp, seqnum, oldmsgnum)) {
                seq_addmsg (newmp, *seq, newmsgnum,
                            is_seq_private (oldmp, seqnum) ? 0 : 1, 0);