From 3a20d23b48c1051e1f22295fd886cc7f643417f6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 10 Dec 2010 19:06:59 +0000 Subject: xserver git update 10/12/2010 --- xorg-server/hw/xfree86/common/xf86Option.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'xorg-server/hw/xfree86/common/xf86Option.c') diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c index 97deb1436..d7b294a86 100644 --- a/xorg-server/hw/xfree86/common/xf86Option.c +++ b/xorg-server/hw/xfree86/common/xf86Option.c @@ -638,13 +638,10 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, newn = n + 2; } else { free(n); - n = malloc(strlen(p->name) + 2 + 1); - if (!n) { + if (asprintf(&n, "No%s", p->name) == -1) { p->found = FALSE; return FALSE; } - strcpy(n, "No"); - strcat(n, p->name); newn = n; } if ((s = xf86findOptionValue(options, newn)) != NULL) { -- cgit v1.2.3