diff options
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Option.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Option.c | 5 |
1 files changed, 1 insertions, 4 deletions
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) {
|