aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c9
-rw-r--r--nx-X11/programs/Xserver/randr/rroutput.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index 7775747f8..1305132c0 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -89,13 +89,10 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
pScrPriv = rrGetScrPriv(pScreen);
/* make space for the crtc pointer */
- if (pScrPriv->numCrtcs)
- crtcs = reallocarray(pScrPriv->crtcs,
- pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr));
- else
- crtcs = malloc(sizeof(RRCrtcPtr));
+ crtcs = reallocarray(pScrPriv->crtcs,
+ pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr));
if (!crtcs)
- return FALSE;
+ return NULL;
pScrPriv->crtcs = crtcs;
crtc = calloc(1, sizeof(RRCrtcRec));
diff --git a/nx-X11/programs/Xserver/randr/rroutput.c b/nx-X11/programs/Xserver/randr/rroutput.c
index 8042b719c..9c52eaed6 100644
--- a/nx-X11/programs/Xserver/randr/rroutput.c
+++ b/nx-X11/programs/Xserver/randr/rroutput.c
@@ -74,13 +74,10 @@ RROutputCreate(ScreenPtr pScreen,
pScrPriv = rrGetScrPriv(pScreen);
- if (pScrPriv->numOutputs)
- outputs = reallocarray(pScrPriv->outputs,
- pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
- else
- outputs = malloc(sizeof(RROutputPtr));
+ outputs = reallocarray(pScrPriv->outputs,
+ pScrPriv->numOutputs + 1, sizeof(RROutputPtr));
if (!outputs)
- return FALSE;
+ return NULL;
pScrPriv->outputs = outputs;