svn commit: r315104 - head/lib/libc/stdio
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Mar 12 03:50:15 UTC 2017
Author: pfg
Date: Sun Mar 12 03:50:13 2017
New Revision: 315104
URL: https://svnweb.freebsd.org/changeset/base/315104
Log:
libc: small cleanup.
Initialize newsize in the code section so we avoids asigning the
value if we exit early.
Modified:
head/lib/libc/stdio/printf-pos.c
Modified: head/lib/libc/stdio/printf-pos.c
==============================================================================
--- head/lib/libc/stdio/printf-pos.c Sun Mar 12 03:49:05 2017 (r315103)
+++ head/lib/libc/stdio/printf-pos.c Sun Mar 12 03:50:13 2017 (r315104)
@@ -641,12 +641,13 @@ __grow_type_table(struct typetable *type
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) {
More information about the svn-src-head
mailing list