summaryrefslogtreecommitdiff
path: root/src/Composite.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Composite.c')
-rw-r--r--src/Composite.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Composite.c b/src/Composite.c
index 6dfb247..9708633 100644
--- a/src/Composite.c
+++ b/src/Composite.c
@@ -247,10 +247,8 @@ CompositeInsertChild(Widget w)
/* Allocate more space */
cw->composite.num_slots += (cw->composite.num_slots / 2) + 2;
cw->composite.children = children =
- (WidgetList) XtRealloc((XtPointer) children,
- (Cardinal) ((unsigned)
- (cw->composite.num_slots) *
- sizeof(Widget)));
+ XtReallocArray(children, cw->composite.num_slots,
+ (Cardinal) sizeof(Widget));
}
/* Ripple children up one space from "position" */
for (i = cw->composite.num_children; i > position; i--) {