summaryrefslogtreecommitdiff
path: root/src/NextEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/NextEvent.c')
-rw-r--r--src/NextEvent.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/NextEvent.c b/src/NextEvent.c
index 1928a81..890cad7 100644
--- a/src/NextEvent.c
+++ b/src/NextEvent.c
@@ -280,10 +280,8 @@ InitFds(XtAppContext app,
wf->stack);
}
else {
- wf->fdlist = (struct pollfd *)
- XtRealloc((char *) wf->fdlist,
- (Cardinal) (sizeof(struct pollfd) *
- (size_t) wf->fdlistlen));
+ wf->fdlist = XtReallocArray(wf->fdlist, (Cardinal) wf->fdlistlen,
+ (Cardinal) sizeof(struct pollfd));
}
if (wf->fdlistlen) {
@@ -1043,11 +1041,8 @@ XtAppAddInput(XtAppContext app,
Cardinal n = (Cardinal) (source + 1);
int ii;
- app->input_list = (InputEvent **) XtRealloc((char *) app->input_list,
- (Cardinal) ((size_t) n *
- sizeof
- (InputEvent
- *)));
+ app->input_list = XtReallocArray(app->input_list, n,
+ (Cardinal) sizeof(InputEvent *));
for (ii = app->input_max; ii < (int) n; ii++)
app->input_list[ii] = (InputEvent *) NULL;
app->input_max = (short) n;