From e172c89783326e2378e4793ff31a0f44210c5534 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 11 Sep 2010 08:41:00 +0000 Subject: xserver git update 11/9/2010 --- xorg-server/hw/xfree86/common/xf86xv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xorg-server/hw/xfree86/common/xf86xv.c') diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index 29c74f66e..74e76f923 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -429,8 +429,7 @@ xf86XVInitAdaptors( pa->ddGetPortAttribute = xf86XVGetPortAttribute; pa->ddQueryBestSize = xf86XVQueryBestSize; pa->ddQueryImageAttributes = xf86XVQueryImageAttributes; - if((pa->name = malloc(strlen(adaptorPtr->name) + 1))) - strcpy(pa->name, adaptorPtr->name); + pa->name = strdup(adaptorPtr->name); if(adaptorPtr->nEncodings && (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { @@ -440,8 +439,7 @@ xf86XVInitAdaptors( { pe->id = encodingPtr->id; pe->pScreen = pScreen; - if((pe->name = malloc(strlen(encodingPtr->name) + 1))) - strcpy(pe->name, encodingPtr->name); + pe->name = strdup(encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; pe->rate.numerator = encodingPtr->rate.numerator; @@ -493,8 +491,7 @@ xf86XVInitAdaptors( pat->flags = attributePtr->flags; pat->min_value = attributePtr->min_value; pat->max_value = attributePtr->max_value; - if((pat->name = malloc(strlen(attributePtr->name) + 1))) - strcpy(pat->name, attributePtr->name); + pat->name = strdup(attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; pa->pAttributes = pAttribute; -- cgit v1.2.3