diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-09-07 12:17:46 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2010-09-07 12:19:21 +0200 |
commit | dfb062e024dfd20789ee8d43c7f94640faa5ea9f (patch) | |
tree | 11a3062c54ffd4927e63104962f7c3b89e7180f4 /src/vmwarevideo.c | |
parent | 12e4577c020c6905d09459d833fd1c5313f1647b (diff) |
vmware/vmwlegacy: Silence compilation errors and -warnings.
Silence warnings and errors on various server versions due to incorrect
usage of libc functions.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/vmwarevideo.c')
-rw-r--r-- | src/vmwarevideo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/vmwarevideo.c b/src/vmwarevideo.c index 8522383..7f78887 100644 --- a/src/vmwarevideo.c +++ b/src/vmwarevideo.c @@ -46,6 +46,11 @@ #include <X11/extensions/Xv.h> +#ifndef HAVE_XORG_SERVER_1_5_0 +#include <xf86_ansic.h> +#include <xf86_libc.h> +#endif + #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) /* @@ -334,7 +339,7 @@ vmwareOffscreenAllocate(VMWAREPtr pVMWARE, uint32 size) return NULL; } - memptr = xalloc(sizeof(VMWAREOffscreenRec)); + memptr = malloc(sizeof(VMWAREOffscreenRec)); if (!memptr) { return NULL; } @@ -443,7 +448,7 @@ vmwareVideoInit(ScreenPtr pScreen) numAdaptors = 1; overlayAdaptors = &newAdaptor; } else { - newAdaptors = xalloc((numAdaptors + 1) * + newAdaptors = malloc((numAdaptors + 1) * sizeof(XF86VideoAdaptorPtr*)); if (!newAdaptors) { xf86XVFreeVideoAdaptorRec(newAdaptor); @@ -463,7 +468,7 @@ vmwareVideoInit(ScreenPtr pScreen) } if (newAdaptors) { - xfree(newAdaptors); + free(newAdaptors); } xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -545,7 +550,7 @@ vmwareVideoSetup(ScrnInfoPtr pScrn) VmwareLog(("Not enough memory\n")); return NULL; } - du = xcalloc(1, VMWARE_VID_NUM_PORTS * + du = calloc(1, VMWARE_VID_NUM_PORTS * (sizeof(DevUnion) + sizeof(VMWAREVideoRec))); if (!du) { @@ -704,7 +709,7 @@ vmwareVideoInitAttributes(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid, TRACEPOINT - fmtData = xcalloc(1, sizeof(VMWAREVideoFmtData)); + fmtData = calloc(1, sizeof(VMWAREVideoFmtData)); if (!fmtData) { return -1; } |