aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/rrmonitor.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:11:38 +0200
commit1dbd3c888a3eee51db5303bd93e95b84999f5d31 (patch)
tree84db92271726b42b8c0864c8b7c77b2330566fc1 /nx-X11/programs/Xserver/randr/rrmonitor.c
parent279d37127db241a9ee685f6b671f51aa21a972ea (diff)
parente85808245810d0cc6918104deef25213d5f9e06c (diff)
downloadnx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.gz
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.tar.bz2
nx-libs-1dbd3c888a3eee51db5303bd93e95b84999f5d31.zip
Merge branch 'sunweaver-pr/backport-Xorg-memory-handling' into 3.6.x
Attributes GH PR #159: https://github.com/ArcticaProject/nx-libs/pull/159 Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 12:47:46 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/randr/rrmonitor.c')
-rw-r--r--nx-X11/programs/Xserver/randr/rrmonitor.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrmonitor.c b/nx-X11/programs/Xserver/randr/rrmonitor.c
index fc9b9295b..42e0de64a 100644
--- a/nx-X11/programs/Xserver/randr/rrmonitor.c
+++ b/nx-X11/programs/Xserver/randr/rrmonitor.c
@@ -95,7 +95,7 @@ RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor)
monitor->name = RRMonitorCrtcName(crtc);
monitor->pScreen = crtc->pScreen;
monitor->numOutputs = crtc->numOutputs;
- monitor->outputs = xcalloc(crtc->numOutputs, sizeof(RRCrtc));
+ monitor->outputs = calloc(crtc->numOutputs, sizeof(RRCrtc));
if (!monitor->outputs)
return FALSE;
for (o = 0; o < crtc->numOutputs; o++)
@@ -173,7 +173,7 @@ RRMonitorSetFromClient(RRMonitorPtr client_monitor, RRMonitorPtr monitor)
monitor->name = client_monitor->name;
monitor->pScreen = client_monitor->pScreen;
monitor->numOutputs = client_monitor->numOutputs;
- monitor->outputs = xcalloc(client_monitor->numOutputs, sizeof(RROutput));
+ monitor->outputs = calloc(client_monitor->numOutputs, sizeof(RROutput));
if (!monitor->outputs && client_monitor->numOutputs)
return FALSE;
memcpy(monitor->outputs, client_monitor->outputs, client_monitor->numOutputs * sizeof(RROutput));
@@ -216,7 +216,7 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
#endif
mon_list->num_crtcs = numCrtcs;
- mon_list->server_crtc = xcalloc(numCrtcs * 2, sizeof(RRCrtcPtr));
+ mon_list->server_crtc = calloc(numCrtcs * 2, sizeof(RRCrtcPtr));
if (!mon_list->server_crtc)
return FALSE;
@@ -298,7 +298,7 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
static void
RRMonitorFiniList(RRMonitorListPtr list)
{
- xfree(list->server_crtc);
+ free(list->server_crtc);
}
/* Construct a complete list of protocol-visible monitors, including
@@ -321,7 +321,7 @@ RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr * monitors_ret
if (!RRMonitorInitList(screen, &list, get_active))
return FALSE;
- monitors = xcalloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
+ monitors = calloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
if (!monitors) {
RRMonitorFiniList(&list);
return FALSE;
@@ -401,7 +401,7 @@ RRMonitorCountList(ScreenPtr screen)
void
RRMonitorFree(RRMonitorPtr monitor)
{
- xfree(monitor);
+ free(monitor);
}
RRMonitorPtr
@@ -409,7 +409,7 @@ RRMonitorAlloc(int noutput)
{
RRMonitorPtr monitor;
- monitor = xcalloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
+ monitor = calloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
if (!monitor)
return NULL;
monitor->numOutputs = noutput;
@@ -512,11 +512,11 @@ RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor)
pScrPriv->numMonitors + 1,
sizeof(RRMonitorPtr));
#else /* !defined(NXAGENT_SERVER) */
- monitors = xrealloc(pScrPriv->monitors,
+ monitors = realloc(pScrPriv->monitors,
(pScrPriv->numMonitors + 1) * sizeof(RRMonitorPtr));
#endif /* !defined(NXAGENT_SERVER) */
else
- monitors = xalloc(sizeof(RRMonitorPtr));
+ monitors = malloc(sizeof(RRMonitorPtr));
if (!monitors)
return BadAlloc;
@@ -573,8 +573,8 @@ RRMonitorFreeList(RRMonitorPtr monitors, int nmon)
int m;
for (m = 0; m < nmon; m++)
- xfree(monitors[m].outputs);
- xfree(monitors);
+ free(monitors[m].outputs);
+ free(monitors);
}
void
@@ -600,7 +600,7 @@ RRMonitorClose(ScreenPtr screen)
for (m = 0; m < pScrPriv->numMonitors; m++)
RRMonitorFree(pScrPriv->monitors[m]);
- xfree(pScrPriv->monitors);
+ free(pScrPriv->monitors);
pScrPriv->monitors = NULL;
pScrPriv->numMonitors = 0;
}