]> diplodocus.org Git - nmh/commitdiff
Replace add(nonnull, NULL) with mh_xstrdup(nonnull).
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Apr 2017 22:49:00 +0000 (23:49 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 16 Apr 2017 22:49:00 +0000 (23:49 +0100)
Only a few cases where it's obvious that the first parameter will not be
NULL.

uip/mhbuildsbr.c
uip/mhn.c
uip/mhstore.c
uip/mhstoresbr.c

index c8b8799..9b733e8 100644 (file)
@@ -993,7 +993,7 @@ use_forw:
 
        /* else, use the current folder */
        if (!folder)
-           folder = add (getfolder (1), NULL);
+           folder = mh_xstrdup(getfolder(1));
 
        if (!(mp = folder_read (folder, 0)))
            adios (NULL, "unable to read folder %s", folder);
index a3f1030..2867f98 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -370,7 +370,7 @@ do_cache:
     /*
      * Cache the current directory before we do any chdirs()'s.
      */
-    cwd = add(pwd(), NULL);
+    cwd = mh_xstrdup(pwd());
 
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
index 98e6239..81d30a1 100644 (file)
@@ -266,7 +266,7 @@ do_cache:
     /*
      * Cache the current directory before we do any chdirs()'s.
      */
-    cwd = add(pwd(), NULL);
+    cwd = mh_xstrdup(pwd());
 
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
index c9725ff..7604c21 100644 (file)
@@ -584,7 +584,7 @@ store_content (CT ct, CT p, mhstoreinfo_t info)
            create_folder(m_mailpath(folder), 0, exit);
 
            /* Record the folder name */
-           ct->c_folder = add (folder, NULL);
+           ct->c_folder = mh_xstrdup(folder);
 
            if (cp[1])
                free (folder);