summaryrefslogtreecommitdiff
path: root/randr/rrmode.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-06 01:44:06 +0700
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 00:22:37 +0700
commit3f3ff971ecff9936cebafc813af9193b97bba89c (patch)
treefdbbad794a42488b7ffe41eed7aba4e498335f55 /randr/rrmode.c
parent96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff)
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'randr/rrmode.c')
-rw-r--r--randr/rrmode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 139619367..01511e2fd 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -58,7 +58,7 @@ RRModeCreate (xRRModeInfo *modeInfo,
if (!RRInit ())
return NULL;
- mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1);
+ mode = malloc(sizeof (RRModeRec) + modeInfo->nameLength + 1);
if (!mode)
return NULL;
mode->refcnt = 1;
@@ -69,13 +69,13 @@ RRModeCreate (xRRModeInfo *modeInfo,
mode->userScreen = userScreen;
if (num_modes)
- newModes = xrealloc (modes, (num_modes + 1) * sizeof (RRModePtr));
+ newModes = realloc(modes, (num_modes + 1) * sizeof (RRModePtr));
else
- newModes = xalloc (sizeof (RRModePtr));
+ newModes = malloc(sizeof (RRModePtr));
if (!newModes)
{
- xfree (mode);
+ free(mode);
return NULL;
}
@@ -164,7 +164,7 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret)
RRModePtr *screen_modes;
int num_screen_modes = 0;
- screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr));
+ screen_modes = malloc((num_modes ? num_modes : 1) * sizeof (RRModePtr));
if (!screen_modes)
return NULL;
@@ -243,14 +243,14 @@ RRModeDestroy (RRModePtr mode)
num_modes--;
if (!num_modes)
{
- xfree (modes);
+ free(modes);
modes = NULL;
}
break;
}
}
- xfree (mode);
+ free(mode);
}
static int