aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-11 08:41:00 +0000
committermarha <marha@users.sourceforge.net>2010-09-11 08:41:00 +0000
commite172c89783326e2378e4793ff31a0f44210c5534 (patch)
tree7faed3d12aa20736af6a18fff1a5745cdf57de46 /xorg-server/hw/kdrive/src
parentc3d4371fec1beb5b71d21a90be5db6d32c4c185f (diff)
downloadvcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.gz
vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.tar.bz2
vcxsrv-e172c89783326e2378e4793ff31a0f44210c5534.zip
xserver git update 11/9/2010
Diffstat (limited to 'xorg-server/hw/kdrive/src')
-rw-r--r--xorg-server/hw/kdrive/src/kxv.c9
1 files changed, 3 insertions, 6 deletions
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;