From 96d6df5da9cddedf4931bf8e17f96e242467c661 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 27 Apr 2011 06:58:32 +0000 Subject: xserver libX11 libxtrans mesa pixman xkeyboard-config git update 27 Apr 2011 --- libX11/src/xcms/PrOfId.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'libX11/src/xcms') diff --git a/libX11/src/xcms/PrOfId.c b/libX11/src/xcms/PrOfId.c index 831f17ab9..a96d28cec 100644 --- a/libX11/src/xcms/PrOfId.c +++ b/libX11/src/xcms/PrOfId.c @@ -66,7 +66,6 @@ XcmsPrefixOfFormat( */ { XcmsColorSpace **papColorSpaces; - char *prefix; /* * First try Device-Independent color spaces @@ -75,10 +74,7 @@ XcmsPrefixOfFormat( if (papColorSpaces != NULL) { while (*papColorSpaces != NULL) { if ((*papColorSpaces)->id == id) { - prefix = (char *)Xmalloc((strlen((*papColorSpaces)->prefix) + - 1) * sizeof(char)); - strcpy(prefix, (*papColorSpaces)->prefix); - return(prefix); + return strdup((*papColorSpaces)->prefix); } papColorSpaces++; } @@ -91,10 +87,7 @@ XcmsPrefixOfFormat( if (papColorSpaces != NULL) { while (*papColorSpaces != NULL) { if ((*papColorSpaces)->id == id) { - prefix = (char *)Xmalloc((strlen((*papColorSpaces)->prefix) + - 1) * sizeof(char)); - strcpy(prefix, (*papColorSpaces)->prefix); - return(prefix); + return strdup((*papColorSpaces)->prefix); } papColorSpaces++; } -- cgit v1.2.3