Added support for optional Content_Disposition header in mhbuild directive.s
[mmh] / uip / conflict.c
index c0ba63b..1713b15 100644 (file)
@@ -3,12 +3,17 @@
  * conflict.c -- check for conflicts in mail system
  *
  * $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
 #include <h/mh.h>
 #include <fcntl.h>
 #include <h/aliasbr.h>
-#include <mts/generic/mts.h>
+#include <h/mts.h>
+#include <h/utils.h>
 #include <grp.h>
 #include <pwd.h>
 
@@ -185,8 +190,7 @@ grp_names (void)
     /* allocate space NGRPS at a time */
     numgroups = 0;
     maxgroups = NGRPS;
-    if (!(grps = (char **) malloc((size_t) (maxgroups * sizeof(*grps)))))
-       adios (NULL, "unable to allocate group name storage");
+    grps = (char **) mh_xmalloc((size_t) (maxgroups * sizeof(*grps)));
 
     setgrent ();
     while ((gr = getgrent ())) {
@@ -201,9 +205,8 @@ grp_names (void)
        if (i >= numgroups) {
            if (numgroups >= maxgroups) {
                maxgroups += NGRPS;
-               if (!(grps = (char **) realloc(grps,
-                       (size_t) (maxgroups * sizeof(*grps)))))
-                   adios (NULL, "unable to reallocate group name storage");
+               grps = (char **) mh_xrealloc(grps,
+                   (size_t) (maxgroups * sizeof(*grps)));
            }
            grps[numgroups++] = getcpy (gr->gr_name);
        }