summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-04 16:04:37 -0700
committerEric Anholt <eric@anholt.net>2010-06-06 15:56:35 -0700
commit2c1fda08e889cad07acb452230da06f9c383d21c (patch)
tree365ebf1e27b2a2ac784ab469d109d86e2edf6597 /src/drmmode_display.c
parentb586624d4f2908d2a998ba87fe0ae31c10f46b91 (diff)
Use libc instead of deprecated libc wrappers for malloc/calloc/free.
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 358baf47..3ea9b0fe 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -342,7 +342,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
crtc->y = y;
crtc->rotation = rotation;
- output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output);
+ output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
if (!output_ids) {
ret = FALSE;
goto done;
@@ -812,18 +812,18 @@ drmmode_output_destroy(xf86OutputPtr output)
drmModeFreePropertyBlob(drmmode_output->edid_blob);
for (i = 0; i < drmmode_output->num_props; i++) {
drmModeFreeProperty(drmmode_output->props[i].mode_prop);
- xfree(drmmode_output->props[i].atoms);
+ free(drmmode_output->props[i].atoms);
}
- xfree(drmmode_output->props);
+ free(drmmode_output->props);
drmModeFreeConnector(drmmode_output->mode_output);
drmmode_output->mode_output = NULL;
if (drmmode_output->private_data) {
- xfree(drmmode_output->private_data);
+ free(drmmode_output->private_data);
drmmode_output->private_data = NULL;
}
if (drmmode_output->backlight_iface)
drmmode_backlight_set(output, drmmode_output->backlight_active_level);
- xfree(drmmode_output);
+ free(drmmode_output);
output->driver_private = NULL;
}
@@ -914,7 +914,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
drmModePropertyPtr drmmode_prop;
int i, j, err;
- drmmode_output->props = xcalloc(mode_output->count_props, sizeof(drmmode_prop_rec));
+ drmmode_output->props = calloc(mode_output->count_props, sizeof(drmmode_prop_rec));
if (!drmmode_output->props)
return;
@@ -939,7 +939,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
INT32 range[2];
p->num_atoms = 1;
- p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+ p->atoms = calloc(p->num_atoms, sizeof(Atom));
if (!p->atoms)
continue;
p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -961,7 +961,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
}
} else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) {
p->num_atoms = drmmode_prop->count_enums + 1;
- p->atoms = xcalloc(p->num_atoms, sizeof(Atom));
+ p->atoms = calloc(p->num_atoms, sizeof(Atom));
if (!p->atoms)
continue;
p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
@@ -1206,7 +1206,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
return;
}
- drmmode_output = xcalloc(sizeof(drmmode_output_private_rec), 1);
+ drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1);
if (!drmmode_output) {
xf86OutputDestroy(output);
drmModeFreeConnector(koutput);
@@ -1220,7 +1220,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
*/
drmmode_output->private_data = NULL;
if (koutput->connector_type == DRM_MODE_CONNECTOR_LVDS) {
- drmmode_output->private_data = xcalloc(
+ drmmode_output->private_data = calloc(
sizeof(struct fixed_panel_lvds), 1);
if (!drmmode_output->private_data)
xf86DrvMsg(scrn->scrnIndex, X_ERROR,