Xephyr: Fix Xcalloc deprecation warnings.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
34df659687
commit
01ca6400d9
|
@ -221,7 +221,7 @@ XF86DRIOpenConnection (Display *dpy, int screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rep.length) {
|
if (rep.length) {
|
||||||
if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) {
|
if (!(*busIdString = (char *)calloc(rep.busIdStringLength + 1, 1))) {
|
||||||
_XEatData(dpy, ((rep.busIdStringLength+3) & ~3));
|
_XEatData(dpy, ((rep.busIdStringLength+3) & ~3));
|
||||||
UnlockDisplay(dpy);
|
UnlockDisplay(dpy);
|
||||||
SyncHandle();
|
SyncHandle();
|
||||||
|
@ -316,7 +316,7 @@ Bool XF86DRIGetClientDriverName(Display *dpy, int screen,
|
||||||
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
|
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
|
||||||
|
|
||||||
if (rep.length) {
|
if (rep.length) {
|
||||||
if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) {
|
if (!(*clientDriverName = (char *)calloc(rep.clientDriverNameLength + 1, 1))) {
|
||||||
_XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3));
|
_XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3));
|
||||||
UnlockDisplay(dpy);
|
UnlockDisplay(dpy);
|
||||||
SyncHandle();
|
SyncHandle();
|
||||||
|
@ -528,7 +528,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
|
||||||
if (*numClipRects) {
|
if (*numClipRects) {
|
||||||
int len = sizeof(drm_clip_rect_t) * (*numClipRects);
|
int len = sizeof(drm_clip_rect_t) * (*numClipRects);
|
||||||
|
|
||||||
*pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
|
*pClipRects = (drm_clip_rect_t *)calloc(len, 1);
|
||||||
if (*pClipRects)
|
if (*pClipRects)
|
||||||
_XRead(dpy, (char*)*pClipRects, len);
|
_XRead(dpy, (char*)*pClipRects, len);
|
||||||
} else {
|
} else {
|
||||||
|
@ -538,7 +538,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
|
||||||
if (*numBackClipRects) {
|
if (*numBackClipRects) {
|
||||||
int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
|
int len = sizeof(drm_clip_rect_t) * (*numBackClipRects);
|
||||||
|
|
||||||
*pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1);
|
*pBackClipRects = (drm_clip_rect_t *)calloc(len, 1);
|
||||||
if (*pBackClipRects)
|
if (*pBackClipRects)
|
||||||
_XRead(dpy, (char*)*pBackClipRects, len);
|
_XRead(dpy, (char*)*pBackClipRects, len);
|
||||||
} else {
|
} else {
|
||||||
|
@ -587,7 +587,7 @@ XF86DRIGetDeviceInfo (Display *dpy, int screen, drm_handle_t *hFrameBuffer,
|
||||||
*devPrivateSize = rep.devPrivateSize;
|
*devPrivateSize = rep.devPrivateSize;
|
||||||
|
|
||||||
if (rep.length) {
|
if (rep.length) {
|
||||||
if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) {
|
if (!(*pDevPrivate = (void *)calloc(rep.devPrivateSize, 1))) {
|
||||||
_XEatData(dpy, ((rep.devPrivateSize+3) & ~3));
|
_XEatData(dpy, ((rep.devPrivateSize+3) & ~3));
|
||||||
UnlockDisplay(dpy);
|
UnlockDisplay(dpy);
|
||||||
SyncHandle();
|
SyncHandle();
|
||||||
|
|
|
@ -262,7 +262,7 @@ ephyrHostXVQueryAdaptors (EphyrHostXVAdaptorArray **a_adaptors)
|
||||||
|
|
||||||
EPHYR_LOG ("enter\n") ;
|
EPHYR_LOG ("enter\n") ;
|
||||||
|
|
||||||
result = Xcalloc (1, sizeof (EphyrHostXVAdaptorArray)) ;
|
result = calloc (1, sizeof (EphyrHostXVAdaptorArray)) ;
|
||||||
if (!result)
|
if (!result)
|
||||||
goto out ;
|
goto out ;
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ ephyrHostXVAdaptorGetVideoFormats (const EphyrHostXVAdaptor *a_this,
|
||||||
EPHYR_RETURN_VAL_IF_FAIL (a_this, NULL) ;
|
EPHYR_RETURN_VAL_IF_FAIL (a_this, NULL) ;
|
||||||
|
|
||||||
nb_formats = ((XvAdaptorInfo*)a_this)->num_formats ;
|
nb_formats = ((XvAdaptorInfo*)a_this)->num_formats ;
|
||||||
formats = Xcalloc (nb_formats, sizeof (EphyrHostVideoFormat)) ;
|
formats = calloc (nb_formats, sizeof (EphyrHostVideoFormat)) ;
|
||||||
for (i=0; i < nb_formats; i++) {
|
for (i=0; i < nb_formats; i++) {
|
||||||
memset (&visual_info_template, 0, sizeof (visual_info_template)) ;
|
memset (&visual_info_template, 0, sizeof (visual_info_template)) ;
|
||||||
visual_info_template.visualid =
|
visual_info_template.visualid =
|
||||||
|
@ -454,7 +454,7 @@ ephyrHostXVQueryEncodings (int a_port_id,
|
||||||
&num_encodings,
|
&num_encodings,
|
||||||
&encoding_info) ;
|
&encoding_info) ;
|
||||||
if (num_encodings && encoding_info) {
|
if (num_encodings && encoding_info) {
|
||||||
encodings = Xcalloc (num_encodings, sizeof (EphyrHostEncoding)) ;
|
encodings = calloc (num_encodings, sizeof (EphyrHostEncoding)) ;
|
||||||
for (i=0; i<num_encodings; i++) {
|
for (i=0; i<num_encodings; i++) {
|
||||||
encodings[i].id = encoding_info[i].encoding_id ;
|
encodings[i].id = encoding_info[i].encoding_id ;
|
||||||
encodings[i].name = strdup (encoding_info[i].name) ;
|
encodings[i].name = strdup (encoding_info[i].name) ;
|
||||||
|
|
Loading…
Reference in New Issue