]> diplodocus.org Git - nmh/blobdiff - uip/mhstoresbr.c
Deference char pointer to test for empty string instead of strlen(3).
[nmh] / uip / mhstoresbr.c
index 62a5ba43b19fa43e7125a0254545ad0b4d1f9ef2..9869914be1c3ccb5feba5fe4223a5b857a0d9be8 100644 (file)
@@ -42,8 +42,9 @@ struct mhstoreinfo {
 
 mhstoreinfo_t
 mhstoreinfo_create (CT *ct, char *pwd, const char *csw, int asw, int vsw) {
-    mhstoreinfo_t info = mh_xmalloc (sizeof *info);
+    mhstoreinfo_t info;
 
+    NEW(info);
     info->cts = ct;
     info->cwd = pwd;
     info->autosw = asw;
@@ -344,9 +345,7 @@ store_partial (CT ct, mhstoreinfo_t info)
        return NOTOK;
     }
 
-    if ((base = (CT *) mh_xcalloc ((size_t) (i + 1), sizeof(*base))) == NULL)
-       adios (NULL, "out of memory");
-
+    base = mh_xcalloc(i + 1, sizeof *base);
     ctq = base;
     for (ctp = info->cts; *ctp; ctp++) {
        p = *ctp;