projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace mh_xmalloc() with mh_xcalloc()
[mmh]
/
uip
/
anno.c
diff --git
a/uip/anno.c
b/uip/anno.c
index
1c97179
..
96b896c
100644
(file)
--- a/
uip/anno.c
+++ b/
uip/anno.c
@@
-305,7
+305,7
@@
annolist(char *file, unsigned char *comp, int number)
}
/* We'll grow this buffer as needed. */
}
/* We'll grow this buffer as needed. */
- field = (char *)mh_xmalloc(field_size = 256);
+ field = (char *)mh_xcalloc(field_size = 256, sizeof(char));
make_comp(&comp);
length = strlen(comp); /* Convenience copy. */
make_comp(&comp);
length = strlen(comp); /* Convenience copy. */
@@
-459,7
+459,7
@@
dodel(int fd, unsigned char *comp, char *text, FILE *tmp, int number)
if ((fp = fdopen(fd, "r")) == NULL) {
adios(EX_IOERR, NULL, "unable to fdopen file.");
}
if ((fp = fdopen(fd, "r")) == NULL) {
adios(EX_IOERR, NULL, "unable to fdopen file.");
}
- field = (char *)mh_xmalloc(field_size);
+ field = (char *)mh_xcalloc(field_size, sizeof(char));
/*
** Copy lines from the input file to the temporary file
/*
** Copy lines from the input file to the temporary file