]> diplodocus.org Git - nmh/blobdiff - sbr/seq_setprev.c
Replace some ints that are only ever 0 or 1 with bool.
[nmh] / sbr / seq_setprev.c
index fdffa9524bcf592b908bfbfdb256e7f61890c61f..5e5c43e9b6ce2a0c8b454017c0266daf34edebdb 100644 (file)
@@ -1,8 +1,4 @@
-
-/*
- * seq_setprev.c -- set the Previous-Sequence
- *
- * $Id$
+/* seq_setprev.c -- set the Previous-Sequence
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -10,6 +6,7 @@
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 
 /*
  * Add all the messages currently SELECTED to
@@ -28,14 +25,12 @@ seq_setprev (struct msgs *mp)
      * Get the list of sequences for Previous-Sequence
      * and split them.
      */
-    if ((cp = context_find (psequence))) {
-       dp = getcpy (cp);
-       if (!(ap = brkstring (dp, " ", "\n")) || !*ap) {
-           free (dp);
-           return;
-       }
-    } else {
-       return;
+    if (!(cp = context_find(psequence)))
+        return;
+    dp = mh_xstrdup(cp);
+    if (!(ap = brkstring(dp, " ", "\n")) || !*ap) {
+        free(dp);
+        return;
     }
 
     /* Now add all SELECTED messages to each sequence */