- if (nmemb == 0 || size == 0)
- adios(EX_SOFTWARE, NULL, "Tried to calloc 0 bytes");
+ if (nmemb == 0 || size == 0) {
+ adios(EX_SOFTWARE, NULL, "Tried to calloc 0 bytes");
+ }
- if ((memory = calloc(nmemb, size))) {
- return memory;
- } else {
- adios(EX_OSERR, NULL, "calloc failed");
- }
+ if ((memory = calloc(nmemb, size))) {
+ return memory;
+ } else {
+ adios(EX_OSERR, NULL, "calloc failed");
+ }
if (autocreate == 0) {
/* ask before creating folder */
cp = concat("Create folder \"", folder, "\"? ", NULL);
if (autocreate == 0) {
/* ask before creating folder */
cp = concat("Create folder \"", folder, "\"? ", NULL);
free(cp);
} else if (autocreate == -1) {
/* do not create, so exit */
done_callback(EX_CANTCREAT);
}
free(cp);
} else if (autocreate == -1) {
/* do not create, so exit */
done_callback(EX_CANTCREAT);
}
adios(EX_CANTCREAT, NULL, "unable to create folder %s", folder);
adios(EX_CANTCREAT, NULL, "unable to create folder %s", folder);
adios(EX_SOFTWARE, NULL, "oops, num_digits called with negative value");
adios(EX_SOFTWARE, NULL, "oops, num_digits called with negative value");
msgs->msgs = mh_xrealloc(msgs->msgs,
(msgs->max+=MAXMSGS)*sizeof(*msgs->msgs));
msgs->msgs = mh_xrealloc(msgs->msgs,
(msgs->max+=MAXMSGS)*sizeof(*msgs->msgs));