From 7011de155a1063a77cbab2f4d1ca599e23d7b102 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan <ïonic@ionic.de> Date: Fri, 16 Sep 2016 23:58:54 +0000 Subject: misc nx-X11/programs/Xserver/randr/: switch to using xreallocarray, since it has been ported now. --- nx-X11/programs/Xserver/randr/rrproperty.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'nx-X11/programs/Xserver/randr/rrproperty.c') diff --git a/nx-X11/programs/Xserver/randr/rrproperty.c b/nx-X11/programs/Xserver/randr/rrproperty.c index dab9e10cc..aad68273a 100644 --- a/nx-X11/programs/Xserver/randr/rrproperty.c +++ b/nx-X11/programs/Xserver/randr/rrproperty.c @@ -183,11 +183,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; -#ifndef NXAGENT_SERVER new_value.data = xallocarray(total_len, size_in_bytes); -#else /* !defined(NXAGENT_SERVER) */ - new_value.data = malloc(total_len * size_in_bytes); -#endif /* !defined(NXAGENT_SERVER) */ if (!new_value.data && total_len && size_in_bytes) { if (add) RRDestroyOutputProperty(prop); @@ -356,11 +352,7 @@ RRConfigureOutputProperty(RROutputPtr output, Atom property, return BadMatch; } -#ifndef NXAGENT_SERVER new_values = xallocarray(num_values, sizeof(INT32)); -#else /* !defined(NXAGENT_SERVER) */ - new_values = malloc(num_values * sizeof(INT32)); -#endif /* !defined(NXAGENT_SERVER) */ if (!new_values && num_values) { if (add) RRDestroyOutputProperty(prop); @@ -410,11 +402,7 @@ ProcRRListOutputProperties(ClientPtr client) for (prop = output->properties; prop; prop = prop->next) numProps++; if (numProps) -#ifndef NXAGENT_SERVER if (!(pAtoms = xallocarray(numProps, sizeof(Atom)))) -#else /* !defined(NXAGENT_SERVER) */ - if (!(pAtoms = malloc(numProps * sizeof(Atom)))) -#endif /* !defined(NXAGENT_SERVER) */ return BadAlloc; rep = (xRRListOutputPropertiesReply) { @@ -461,11 +449,7 @@ ProcRRQueryOutputProperty(ClientPtr client) return BadName; if (prop->num_valid) { -#ifndef NXAGENT_SERVER extra = xallocarray(prop->num_valid, sizeof(INT32)); -#else /* !defined(NXAGENT_SERVER) */ - extra = malloc(prop->num_valid * sizeof(INT32)); -#endif /* !defined(NXAGENT_SERVER) */ if (!extra) return BadAlloc; } -- cgit v1.2.3