diff options
Diffstat (limited to 'src/Event.c')
-rw-r--r-- | src/Event.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Event.c b/src/Event.c index 1bb5bd0..3939a18 100644 --- a/src/Event.c +++ b/src/Event.c @@ -1780,10 +1780,9 @@ XtRegisterExtensionSelector(Display *dpy, } } pd->ext_select_count++; - pd->ext_select_list = - (ExtSelectRec *) XtRealloc((char *) pd->ext_select_list, - (Cardinal) ((size_t) pd->ext_select_count * - sizeof(ExtSelectRec))); + pd->ext_select_list = XtReallocArray(pd->ext_select_list, + (Cardinal) pd->ext_select_count, + (Cardinal) sizeof(ExtSelectRec)); for (i = pd->ext_select_count - 1; i > 0; i--) { if (pd->ext_select_list[i - 1].min > min_event_type) { pd->ext_select_list[i] = pd->ext_select_list[i - 1]; |