projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix used-uninitialised warning in new.c
[mmh]
/
uip
/
conflict.c
diff --git
a/uip/conflict.c
b/uip/conflict.c
index
c0ba63b
..
07e77fc
100644
(file)
--- a/
uip/conflict.c
+++ b/
uip/conflict.c
@@
-2,13
+2,16
@@
/*
* conflict.c -- check for conflicts in mail system
*
/*
* 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 <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>
#include <grp.h>
#include <pwd.h>
@@
-134,7
+137,8
@@
main (int argc, char **argv)
#endif /* UCI */
maildrops ();
#endif /* UCI */
maildrops ();
- return done (0);
+ done (0);
+ return 1;
}
}
@@
-185,8
+189,7
@@
grp_names (void)
/* allocate space NGRPS at a time */
numgroups = 0;
maxgroups = NGRPS;
/* 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 ())) {
setgrent ();
while ((gr = getgrent ())) {
@@
-201,9
+204,8
@@
grp_names (void)
if (i >= numgroups) {
if (numgroups >= maxgroups) {
maxgroups += NGRPS;
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);
}
}
grps[numgroups++] = getcpy (gr->gr_name);
}