aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xlibi18n/lcFile.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
committermarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
commit96d6df5da9cddedf4931bf8e17f96e242467c661 (patch)
tree07977c913b04e80b7dbd302e7a5890422aeacb1b /libX11/src/xlibi18n/lcFile.c
parent71372d36e1a3f0230b88808f70d35446fda12260 (diff)
downloadvcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.gz
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.bz2
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.zip
xserver libX11 libxtrans mesa pixman xkeyboard-config git update 27 Apr 2011
Diffstat (limited to 'libX11/src/xlibi18n/lcFile.c')
-rw-r--r--libX11/src/xlibi18n/lcFile.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libX11/src/xlibi18n/lcFile.c b/libX11/src/xlibi18n/lcFile.c
index 18756c1ca..4e4439773 100644
--- a/libX11/src/xlibi18n/lcFile.c
+++ b/libX11/src/xlibi18n/lcFile.c
@@ -423,10 +423,7 @@ resolve_name(
from = args[1], to = args[0]; /* right to left */
}
if (! strcmp(from, lc_name)) {
- name = Xmalloc(strlen(to) + 1);
- if (name != NULL) {
- strcpy(name, to);
- }
+ name = strdup(to);
break;
}
}
@@ -579,8 +576,7 @@ _XlcResolveLocaleName(
if (name == NULL) {
/* vendor locale name == Xlocale name, no expansion of alias */
- pub->siname = Xmalloc (strlen (lc_name) + 1);
- strcpy (pub->siname, lc_name);
+ pub->siname = strdup (lc_name);
} else {
pub->siname = name;
}
@@ -729,8 +725,7 @@ _XlcLocaleDirName(char *dir_name, size_t dir_len, char *lc_name)
last_dir_len = strlen (dir_name) + 1;
last_dir_name = Xmalloc (last_dir_len);
strcpy (last_dir_name, dir_name);
- last_lc_name = Xmalloc (strlen (lc_name) + 1);
- strcpy (last_lc_name, lc_name);
+ last_lc_name = strdup (lc_name);
return dir_name;
}
@@ -828,8 +823,7 @@ _XlcLocaleLibDirName(char *dir_name, size_t dir_len, char *lc_name)
last_dir_len = strlen (dir_name) + 1;
last_dir_name = Xmalloc (last_dir_len);
strcpy (last_dir_name, dir_name);
- last_lc_name = Xmalloc (strlen (lc_name) + 1);
- strcpy (last_lc_name, lc_name);
+ last_lc_name = strdup (lc_name);
return dir_name;
}