summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_video.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 /hw/xfree86/os-support/linux/lnx_video.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 'hw/xfree86/os-support/linux/lnx_video.c')
-rw-r--r--hw/xfree86/os-support/linux/lnx_video.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 26a17425a..bdd2639ba 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -182,7 +182,7 @@ mtrr_cull_wc_region(int screenNum, unsigned long base, unsigned long size,
/* Found an overlapping region. Delete it. */
- wcr = xalloc(sizeof(*wcr));
+ wcr = malloc(sizeof(*wcr));
if (!wcr)
return NULL;
wcr->sentry.base = gent.base;
@@ -203,7 +203,7 @@ mtrr_cull_wc_region(int screenNum, unsigned long base, unsigned long size,
wcreturn = wcr;
gent.regnum--;
} else {
- xfree(wcr);
+ free(wcr);
xf86DrvMsgVerb(screenNum, X_WARNING, 0,
"Failed to remove MMIO "
"write-combining range (0x%lx,0x%lx)\n",
@@ -263,7 +263,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size,
if (!mtrr_open(from == X_CONFIG ? 0 : 2))
return wcreturn;
- *wcr = curwcr = xalloc(sizeof(**wcr));
+ *wcr = curwcr = malloc(sizeof(**wcr));
if (!curwcr)
return wcreturn;
@@ -313,7 +313,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size,
}
else {
*wcr = curwcr->next;
- xfree(curwcr);
+ free(curwcr);
/* Don't complain about the VGA region: MTRR fixed
regions aren't currently supported, but might be in
@@ -339,7 +339,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr)
ioctl(mtrr_fd, MTRRIOC_DEL_ENTRY, &p->sentry);
prev = p;
p = p->next;
- xfree(prev);
+ free(prev);
}
}
}