diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-03 17:42:47 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-07 00:06:24 +0000 |
commit | b3b0c1ad25a5d0f628eddd00113a40364d68480b (patch) | |
tree | 7b1088ab3cc984dd606df1b56fdda7dec975432f /src/SetWMCW.c | |
parent | b1b54c50d0e5851d72c1e7aff4057687be2e447e (diff) |
Replace XtMalloc() calls with XtMallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/SetWMCW.c')
-rw-r--r-- | src/SetWMCW.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SetWMCW.c b/src/SetWMCW.c index 413142b..52b71e5 100644 --- a/src/SetWMCW.c +++ b/src/SetWMCW.c @@ -92,7 +92,7 @@ XtSetWMColormapWindows(Widget widget, Widget *list, Cardinal count) return; } - top = checked = (Widget *) __XtMalloc((Cardinal) sizeof(Widget) * count); + top = checked = XtMallocArray(count, (Cardinal) sizeof(Widget)); /* * The specification calls for only adding the windows that have unique @@ -136,7 +136,7 @@ XtSetWMColormapWindows(Widget widget, Widget *list, Cardinal count) * windows and set the property. */ - data = (Window *) __XtMalloc((Cardinal) sizeof(Window) * checked_count); + data = XtMallocArray(checked_count, (Cardinal) sizeof(Window)); for (i = 0; i < checked_count; i++) data[i] = XtWindow(top[i]); |