diff --git a/Xi/getprop.c b/Xi/getprop.c index 54b8131ec..4e23c100e 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -117,7 +117,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); if (count) { rep.count = count; - buf = xallocarray(rep.count, sizeof(XEventClass)); + buf = calloc(rep.count, sizeof(XEventClass)); rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf; diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 8db6b03d1..bf3b82dd0 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -221,7 +221,7 @@ list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) if (nprops) { Atom *a; - atoms = xallocarray(nprops, sizeof(Atom)); + atoms = calloc(nprops, sizeof(Atom)); if (!atoms) return BadAlloc; a = atoms; @@ -724,7 +724,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; - new_value.data = xallocarray(total_len, size_in_bytes); + new_value.data = calloc(total_len, size_in_bytes); if (!new_value.data && total_len && size_in_bytes) { if (add) XIDestroyDeviceProperty(prop);