summaryrefslogtreecommitdiff
path: root/src/VarCreate.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-03 16:23:20 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-07 00:06:24 +0000
commitb1b54c50d0e5851d72c1e7aff4057687be2e447e (patch)
tree9f58e135805accd2ce2bd0bf57d19a02c44064e4 /src/VarCreate.c
parent4ece1c842a08c11c1f84b95355801d41cd8435b1 (diff)
Replace XtRealloc() calls with XtReallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/VarCreate.c')
-rw-r--r--src/VarCreate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/VarCreate.c b/src/VarCreate.c
index ecebf3f..70cd32b 100644
--- a/src/VarCreate.c
+++ b/src/VarCreate.c
@@ -295,9 +295,8 @@ _XtVaOpenApplication(XtAppContext *app_context_return,
typed_args[count].size = 0;
}
count++;
- typed_args = (XtTypedArgList)
- XtRealloc((char *) typed_args,
- (Cardinal) ((size_t) (count + 1) * sizeof(XtTypedArg)));
+ typed_args = XtReallocArray(typed_args, (Cardinal) count + 1,
+ (Cardinal) sizeof(XtTypedArg));
}
typed_args[count].name = NULL;