diff options
author | marha <marha@users.sourceforge.net> | 2011-04-27 06:58:32 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-27 06:58:32 +0000 |
commit | 96d6df5da9cddedf4931bf8e17f96e242467c661 (patch) | |
tree | 07977c913b04e80b7dbd302e7a5890422aeacb1b /libX11/src/xlibi18n/lcPublic.c | |
parent | 71372d36e1a3f0230b88808f70d35446fda12260 (diff) | |
download | vcxsrv-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/lcPublic.c')
-rw-r--r-- | libX11/src/xlibi18n/lcPublic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libX11/src/xlibi18n/lcPublic.c b/libX11/src/xlibi18n/lcPublic.c index 2c02f5fba..1b1fb548a 100644 --- a/libX11/src/xlibi18n/lcPublic.c +++ b/libX11/src/xlibi18n/lcPublic.c @@ -80,15 +80,13 @@ create( XLCd lcd; XLCdPublicMethods new; - lcd = (XLCd) Xmalloc(sizeof(XLCdRec)); + lcd = Xcalloc(1, sizeof(XLCdRec)); if (lcd == NULL) return (XLCd) NULL; - bzero((char *) lcd, sizeof(XLCdRec)); - lcd->core = (XLCdCore) Xmalloc(sizeof(XLCdPublicRec)); + lcd->core = Xcalloc(1, sizeof(XLCdPublicRec)); if (lcd->core == NULL) goto err; - bzero((char *) lcd->core, sizeof(XLCdPublicRec)); new = (XLCdPublicMethods) Xmalloc(sizeof(XLCdPublicMethodsRec)); if (new == NULL) @@ -130,10 +128,9 @@ load_public( _XlcGetResource(lcd, "XLC_XLOCALE", "encoding_name", &values, &num); str = (num > 0) ? values[0] : "STRING"; - pub->encoding_name = (char*) Xmalloc(strlen(str) + 1); + pub->encoding_name = strdup(str); if (pub->encoding_name == NULL) return False; - strcpy(pub->encoding_name, str); return True; } |