aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Mode.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-08 16:07:08 +0000
committermarha <marha@users.sourceforge.net>2010-12-08 16:07:08 +0000
commit8308417ba79394ca96a326c8cb5c36024b36c1e2 (patch)
treec6e087e837c83457b68a7a10363af47778a9b1b7 /xorg-server/hw/xfree86/common/xf86Mode.c
parentfea28ce54ffbea6eda28791518ccca0e0df2df0d (diff)
parent531a0d974b98074978535f086a73b6b662fa0cea (diff)
downloadvcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.tar.gz
vcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.tar.bz2
vcxsrv-8308417ba79394ca96a326c8cb5c36024b36c1e2.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Mode.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Mode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index 2ba5ea990..df0884794 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -1643,8 +1643,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
new = xnfcalloc(1, sizeof(DisplayModeRec));
new->prev = last;
new->type = M_T_USERDEF;
- new->name = xnfalloc(strlen(modeNames[i]) + 1);
- strcpy(new->name, modeNames[i]);
+ new->name = xnfstrdup(modeNames[i]);
if (new->prev)
new->prev->next = new;
*endp = last = new;
@@ -1716,10 +1715,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
p = xnfcalloc(1, sizeof(DisplayModeRec));
p->prev = last;
- p->name = xnfalloc(strlen(r->name) + 1);
+ p->name = xnfstrdup(r->name);
if (!userModes)
p->type = M_T_USERDEF;
- strcpy(p->name, r->name);
if (p->prev)
p->prev->next = p;
*endp = last = p;