]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib/printf: ditch reallocarray
authorDavid Lamparter <equinox@diac24.net>
Tue, 14 May 2019 21:21:55 +0000 (23:21 +0200)
committerDavid Lamparter <equinox@diac24.net>
Mon, 3 Jun 2019 16:57:31 +0000 (18:57 +0200)
reallocarray() is walled behind stupid feature macros on various
platforms and doesn't quite gain us much in that particular use case.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/printf/printf-pos.c

index 7e5231c27e9ecb1388910b6f95d07124889b30bb..399573e6c1040f24953226ab1ca875ba025bab8f 100644 (file)
@@ -661,7 +661,7 @@ __grow_type_table(struct typetable *types)
                        return (-1);
                bcopy(oldtable, newtable, oldsize * sizeof(enum typeid));
        } else {
-               newtable = reallocarray(oldtable, newsize, sizeof(enum typeid));
+               newtable = realloc(oldtable, newsize * sizeof(enum typeid));
                if (newtable == NULL)
                        return (-1);
        }