Thread (4 messages) flat view 4 messages, 3 authors, 2021-03-15

Re: [PATCH iproute2-next v2] dcb: Fix compilation warning about reallocarray

From: Petr Machata <petrm@nvidia.com>
Date: 2021-03-15 13:11:08

Petr Machata [off-list ref] writes:
Roi Dayan [off-list ref] writes:
quoted
--- a/dcb/dcb_app.c
+++ b/dcb/dcb_app.c
@@ -65,8 +65,7 @@ static void dcb_app_table_fini(struct dcb_app_table *tab)
 
 static int dcb_app_table_push(struct dcb_app_table *tab, struct dcb_app *app)
 {
-	struct dcb_app *apps = reallocarray(tab->apps, tab->n_apps + 1,
-					    sizeof(*tab->apps));
+	struct dcb_app *apps = realloc(tab->apps, (tab->n_apps + 1) * sizeof(*tab->apps));
Reviewed-by: Petr Machata <petrm@nvidia.com>
Could this be merged, please?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help