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:
parent
211e3840fc
commit
88f6ffe449
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue