summaryrefslogtreecommitdiff
path: root/xf86drm.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-10-27 18:44:53 -0400
committerAdam Jackson <ajax@redhat.com>2010-10-27 18:46:57 -0400
commit0a1ff35c70730160973715b82112cd97c62ac13e (patch)
treeb02a41ec1eaf9650d763e14e536b3b7088ea7bdd /xf86drm.c
parent057fab3382c02af54126ce395c43d4e6dce9439a (diff)
s/drmStrdup/strdup/
_DRM_MALLOC hasn't been a relevant concern since we split libdrm out from xserver. Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/xf86drm.c b/xf86drm.c
index e48b9c99..896b9ba0 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -155,23 +155,6 @@ void drmFree(void *pt)
free(pt);
}
-/* drmStrdup can't use strdup(3), since it doesn't call _DRM_MALLOC... */
-static char *drmStrdup(const char *s)
-{
- char *retval;
-
- if (!s)
- return NULL;
-
- retval = malloc(strlen(s)+1);
- if (!retval)
- return NULL;
-
- strcpy(retval, s);
-
- return retval;
-}
-
/**
* Call ioctl, restarting if it is interupted
*/
@@ -726,11 +709,11 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
d->version_minor = s->version_minor;
d->version_patchlevel = s->version_patchlevel;
d->name_len = s->name_len;
- d->name = drmStrdup(s->name);
+ d->name = strdup(s->name);
d->date_len = s->date_len;
- d->date = drmStrdup(s->date);
+ d->date = strdup(s->date);
d->desc_len = s->desc_len;
- d->desc = drmStrdup(s->desc);
+ d->desc = strdup(s->desc);
}
@@ -2543,5 +2526,5 @@ char *drmGetDeviceNameFromFd(int fd)
if (i == DRM_MAX_MINOR)
return NULL;
- return drmStrdup(name);
+ return strdup(name);
}