}
}
- argvarray = (char **)mh_xmalloc(sizeof *argvarray * (MAXARGS + 5));
+ argvarray = mh_xmalloc(sizeof *argvarray * (MAXARGS + 5));
/*
* The simple case - no spaces or shell metacharacters
/* allocate initial space for pointers on first call */
if (!broken) {
len = NUMBROKEN;
- broken = (char **) mh_xmalloc ((size_t) (len * sizeof(*broken)));
+ broken = mh_xmalloc ((size_t) (len * sizeof(*broken)));
}
/*
if (use_iconv) {
saveq = q;
savedstlen = dstlen;
- q = convbuf = (char *) mh_xmalloc(endofmime - startofmime);
+ q = convbuf = mh_xmalloc(endofmime - startofmime);
}
/* ADDCHR2 is for adding characters when q is or might be convbuf:
* in this case on buffer-full we want to run iconv before returning.
* name of the messages in this folder.
*/
len = NUMMSGS;
- mi = (int *) mh_xmalloc ((size_t) (len * sizeof(*mi)));
+ mi = mh_xmalloc ((size_t) (len * sizeof(*mi)));
while ((dp = readdir (dd))) {
if ((msgnum = m_atoi (dp->d_name)) && msgnum > 0) {
*/
if (mp->nummsg >= len) {
len += NUMMSGS;
- mi = (int *) mh_xrealloc (mi, (size_t) (len * sizeof(*mi)));
+ mi = mh_xrealloc (mi, (size_t) (len * sizeof(*mi)));
}
/* Check if this is the first message we've seen */
n++;
}
- arguments = (char **) mh_xmalloc ((argc + n) * sizeof(*arguments));
+ arguments = mh_xmalloc ((argc + n) * sizeof(*arguments));
bp = arguments;
/* Copy any arguments from profile/context */
* separator) or the last char (since the matchc would have found it
* if it was a real delim).
*/
- s->pat_map = (char **) mh_xcalloc (256, sizeof(char *));
+ s->pat_map = mh_xcalloc (256, sizeof(char *));
for (cp = s->fdelim + 1; cp < s->delimend; cp++ )
s->pat_map[(unsigned char)*cp] = cp;
* us room for a terminating NUL
*/
- *psecret = (sasl_secret_t *) malloc(sizeof(sasl_secret_t) + len);
+ *psecret = malloc(sizeof(sasl_secret_t) + len);
if (! *psecret)
return SASL_NOMEM;
* This buffer might need to be quite large, so we grow it as needed.
*/
- field = (char *)mh_xmalloc(field_size = 256);
+ field = mh_xmalloc(field_size = 256);
/*
* Get the length of the field name since we use it often.
}
if (++n >= field_size - 1) {
- field = (char *) mh_xrealloc((void *)field, field_size += 256);
+ field = mh_xrealloc((void *)field, field_size += 256);
cp = field + n - 1;
}
if ((fp = fdopen(fd, "r")) == NULL)
adios(NULL, "unable to fdopen file.");
- field = (char *)mh_xmalloc(field_size = 256);
+ field = mh_xmalloc(field_size = 256);
}
/*
}
if (++n >= field_size - 1) {
- field = (char *) mh_xrealloc((void *)field, field_size *= 2);
+ field = mh_xrealloc((void *)field, field_size *= 2);
cp = field + n - 1;
}
/* allocate the initial space to record the folder names */
numfolders = 0;
maxfolders = MAXFOLDERS;
- foldersToDo = (char **) mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo)));
+ foldersToDo = mh_xmalloc ((size_t) (maxfolders * sizeof(*foldersToDo)));
/* no sequences yet */
sequencesToDo = svector_create (0);
*/
if (numfolders >= maxfolders) {
maxfolders += MAXFOLDERS;
- foldersToDo = (char **) mh_xrealloc (foldersToDo,
+ foldersToDo = mh_xrealloc (foldersToDo,
(size_t) (maxfolders * sizeof(*foldersToDo)));
}
if (*cp == '+' || *cp == '@') {
AllocFolders(&orders, &nOrdersAlloced, nOrders + 1);
o = &orders[nOrders++];
o->priority = priority++;
- o->name = (char *) mh_xmalloc(p - s + 1);
+ o->name = mh_xmalloc(p - s + 1);
strncpy(o->name, s, p - s);
o->name[p - s] = 0;
} else
return;
if (*f == NULL) {
*nfa = 10;
- *f = (struct Folder *) mh_xmalloc (*nfa * (sizeof(struct Folder)));
+ *f = mh_xmalloc (*nfa * (sizeof(struct Folder)));
} else {
*nfa *= 2;
- *f = (struct Folder *) mh_xrealloc (*f, *nfa * (sizeof(struct Folder)));
+ *f = mh_xrealloc (*f, *nfa * (sizeof(struct Folder)));
}
}
/*
* sort a list of pointers to our "messages to be sorted".
*/
- dlist = (struct smsg **) mh_xmalloc ((nmsgs+1) * sizeof(*dlist));
+ dlist = mh_xmalloc ((nmsgs+1) * sizeof(*dlist));
for (i = 0; i < nmsgs; i++)
dlist[i] = &smsgs[i];
dlist[nmsgs] = 0;
struct smsg **slist, **flist;
struct smsg ***il, **fp, **dp;
- slist = (struct smsg **) mh_xmalloc ((nmsgs+1) * sizeof(*slist));
+ slist = mh_xmalloc ((nmsgs+1) * sizeof(*slist));
memcpy((char *)slist, (char *)dlist, (nmsgs+1)*sizeof(*slist));
qsort((char *)slist, nmsgs, sizeof(*slist), (qsort_comp) subsort);
* make up the final list, chronological but with
* all the same subjects grouped together.
*/
- flist = (struct smsg **) mh_xmalloc ((nmsgs+1) * sizeof(*flist));
+ flist = mh_xmalloc ((nmsgs+1) * sizeof(*flist));
fp = flist;
for (dp = dlist; *dp;) {
struct smsg **s = il[(*dp++)->s_msg];
while (argp[i])
i++;
}
- args = (char **) mh_xmalloc((i + 2) * sizeof(char *));
+ args = mh_xmalloc((i + 2) * sizeof(char *));
/*
* For backward compatibility, we need to add -build