]> diplodocus.org Git - nmh/blobdiff - uip/new.c
Don't need to cast to `char *' for free(3) these days.
[nmh] / uip / new.c
index 2304c1efebfab0691c3328950ff791c6ba37ca8a..ff9c398bb7a0646cf805ba969ae11e88bda7c86e 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -280,7 +280,7 @@ check_folders(struct node **first, struct node **last,
        while (vfgets(fp, &line) == OK) {
            len = strlen(line) - 1;
            line[len] = '\0';
        while (vfgets(fp, &line) == OK) {
            len = strlen(line) - 1;
            line[len] = '\0';
-           check_folder(getcpy(line), len, &b);
+           check_folder(mh_xstrdup(line), len, &b);
        }
        fclose(fp);
     }
        }
        fclose(fp);
     }
@@ -342,14 +342,15 @@ doit(char *cur, char *folders, char *sequences[])
        if (first == NULL) {
            /* No folders at all... */
            return NULL;
        if (first == NULL) {
            /* No folders at all... */
            return NULL;
-       } else if (first->n_next == NULL) {
+       }
+        if (first->n_next == NULL) {
            /* We have only one node; any desired messages in it? */
            if (first->n_field == NULL) {
                return NULL;
            /* We have only one node; any desired messages in it? */
            if (first->n_field == NULL) {
                return NULL;
-           } else {
-               return first;
            }
            }
-       } else if (cur_node == NULL) {
+            return first;
+       }
+        if (cur_node == NULL) {
            /* Current folder is not listed in .folders, return first. */
            return first;
        }
            /* Current folder is not listed in .folders, return first. */
            return first;
        }