From b1b54c50d0e5851d72c1e7aff4057687be2e447e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 3 Mar 2023 16:23:20 -0800 Subject: Replace XtRealloc() calls with XtReallocArray() Signed-off-by: Alan Coopersmith --- src/VarCreate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/VarCreate.c') 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; -- cgit v1.2.3