realloc -> xrealloc
This commit is contained in:
parent
775df18a70
commit
1df3ab05b5
@ -62,7 +62,7 @@ ssize_t rc_getline(char **line, size_t *len, FILE *fp)
|
|||||||
while(!feof(fp)) {
|
while(!feof(fp)) {
|
||||||
if (*line == NULL || last != 0) {
|
if (*line == NULL || last != 0) {
|
||||||
*len += BUFSIZ;
|
*len += BUFSIZ;
|
||||||
*line = realloc(*line, *len);
|
*line = xrealloc(*line, *len);
|
||||||
}
|
}
|
||||||
p = *line + last;
|
p = *line + last;
|
||||||
memset(p, 0, BUFSIZ);
|
memset(p, 0, BUFSIZ);
|
||||||
|
Loading…
Reference in New Issue
Block a user