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/kdrive/src/kxv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xorg-server/hw/kdrive') diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c index cf960e62b..e76a2c419 100644 --- a/xorg-server/hw/kdrive/src/kxv.c +++ b/xorg-server/hw/kdrive/src/kxv.c @@ -377,8 +377,7 @@ KdXVInitAdaptors( pa->ddGetPortAttribute = KdXVGetPortAttribute; pa->ddQueryBestSize = KdXVQueryBestSize; pa->ddQueryImageAttributes = KdXVQueryImageAttributes; - 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)))) { @@ -388,8 +387,7 @@ KdXVInitAdaptors( { 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; @@ -441,8 +439,7 @@ KdXVInitAdaptors( 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