summaryrefslogtreecommitdiff
path: root/hw/dmx/input/dmxarg.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2015-03-21 17:59:13 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-04-21 16:58:08 -0700
commit0018784cdde19444a8f970bc414796fc2a523a51 (patch)
tree779eb85d61f1ef33485fea8783b0d7f7080d2276 /hw/dmx/input/dmxarg.c
parentdc5acaa28ab9ed091f087e56046400d63f1f192a (diff)
Convert hw/dmx to new *allocarray functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'hw/dmx/input/dmxarg.c')
-rw-r--r--hw/dmx/input/dmxarg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dmx/input/dmxarg.c b/hw/dmx/input/dmxarg.c
index 4a74b4c9e..6c21ae959 100644
--- a/hw/dmx/input/dmxarg.c
+++ b/hw/dmx/input/dmxarg.c
@@ -86,7 +86,7 @@ void
dmxArgAdd(dmxArg a, const char *string)
{
if (a->argm <= a->argc + 2)
- a->argv = realloc(a->argv, sizeof(*a->argv) * (a->argm *= 2));
+ a->argv = reallocarray(a->argv, (a->argm *= 2), sizeof(*a->argv));
a->argv[a->argc++] = strdup(string);
a->argv[a->argc] = NULL;
}