libc: small cleanup.
Initialize newsize in the code section so we avoids asigning the value if we exit early.
This commit is contained in:
parent
901a475b7a
commit
97721eb583
@ -641,12 +641,13 @@ __grow_type_table(struct typetable *types)
|
||||
enum typeid *const oldtable = types->table;
|
||||
const int oldsize = types->tablesize;
|
||||
enum typeid *newtable;
|
||||
u_int n, newsize = oldsize * 2;
|
||||
u_int n, newsize;
|
||||
|
||||
/* Detect overflow */
|
||||
if (types->nextarg > NL_ARGMAX)
|
||||
return (-1);
|
||||
|
||||
newsize = oldsize * 2;
|
||||
if (newsize < types->nextarg + 1)
|
||||
newsize = types->nextarg + 1;
|
||||
if (oldsize == STATIC_ARG_TBL_SIZE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user