util: remove dead code in freadline_wrapped

Each loop iteration starts with 'i < size'. When i is changed
the invariant is kept by checking if 'i == size' and growing the
buffer.
This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-01-21 09:37:23 -02:00 committed by Lucas De Marchi
parent 211e3840fc
commit 88f6ffe449
1 changed files with 1 additions and 7 deletions

View File

@ -314,13 +314,7 @@ char *freadline_wrapped(FILE *fp, unsigned int *linenum)
n++;
{
char *ret;
if (i == size) {
ret = realloc(buf, size + 1);
if (!ret)
return NULL;
} else
ret = buf;
char *ret = buf;
ret[i] = '\0';
buf = NULL;
if (linenum)