projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace free() with mh_free0()
[mmh]
/
uip
/
mhtest.c
diff --git
a/uip/mhtest.c
b/uip/mhtest.c
index
dd45626
..
0fa9741
100644
(file)
--- a/
uip/mhtest.c
+++ b/
uip/mhtest.c
@@
-209,7
+209,7
@@
main(int argc, char **argv)
** check if message is coming from file
*/
if (file) {
** check if message is coming from file
*/
if (file) {
- cts = (CT *) mh_xcalloc((size_t) 2, sizeof(*cts));
+ cts = mh_xcalloc(2, sizeof(*cts));
ctp = cts;
if ((ct = parse_mime(file)))
ctp = cts;
if ((ct = parse_mime(file)))
@@
-241,8
+241,7
@@
main(int argc, char **argv)
exit(EX_USAGE);
seq_setprev(mp); /* set the previous-sequence */
exit(EX_USAGE);
seq_setprev(mp); /* set the previous-sequence */
- cts = (CT *) mh_xcalloc((size_t) (mp->numsel + 1),
- sizeof(*cts));
+ cts = mh_xcalloc(mp->numsel + 1, sizeof(*cts));
ctp = cts;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
ctp = cts;
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
@@
-287,8
+286,7
@@
main(int argc, char **argv)
for (ctp = cts; *ctp; ctp++)
free_content(*ctp);
for (ctp = cts; *ctp; ctp++)
free_content(*ctp);
- free((char *) cts);
- cts = NULL;
+ mh_free0(&cts);
/* If reading from a folder, do some updating */
if (mp) {
/* If reading from a folder, do some updating */
if (mp) {