aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-08 14:33:00 +0200
committermarha <marha@users.sourceforge.net>2014-06-08 14:33:00 +0200
commit2acb86c9b086bdb9a3897db0b93820652e07cb59 (patch)
tree02a43a0005c991c736f03de9a1c8ba98f0bbdf28 /libX11/modules
parent816a5430313e07083c5325f0a430126a2e10ec41 (diff)
downloadvcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.tar.gz
vcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.tar.bz2
vcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.zip
xwininfo libX11 mesa mkfontscale xserver git updated 8 June 2014
xserver commit e27a839bf0488d5b1cc2e2a887f2ea0e3d790790 libxcb commit d978a4f69b30b630f28d07f1003cf290284d24d8 libxcb/xcb-proto commit 389889e2f95af19e7fc7ac89e7faeb2f28652415 xkeyboard-config commit bc3ac1b0d152e929b3532a541596cf9fe286bb9e libX11 commit d81fed46144d089bdfa1d916a28dffc9ebffe1e4 libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f libXext commit 11aad96bd689d54156064d2e81213dc827a689d1 libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909 libXau commit 1e4635be11154dd8262f37b379511bd627defa2a xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 pixman commit 9cd283b2eb8279824406bfd47b020d21fc00cf82 xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 glproto commit f84853d97d5749308992412a215fa518b6536eb3 mkfontscale commit 48e541dc2f2fc3f4e99d3e168c28241ff5adff4d xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647 libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738 libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63 libxtrans commit a57a7f62242e1ea972b81414741729bf3dbae0a4 fontconfig commit f44bfad235e63bb792c38e16ae1fbd281ec1453b mesa commit eb58aa9cf015e79a0fcf2e088676e6aa1d5dabce
Diffstat (limited to 'libX11/modules')
-rw-r--r--libX11/modules/im/ximcp/imCallbk.c6
-rw-r--r--libX11/modules/im/ximcp/imDefIc.c7
-rw-r--r--libX11/modules/im/ximcp/imDefIm.c6
-rw-r--r--libX11/modules/im/ximcp/imDefLkup.c13
-rw-r--r--libX11/modules/im/ximcp/imInt.c9
-rw-r--r--libX11/modules/im/ximcp/imLcIm.c102
-rw-r--r--libX11/modules/im/ximcp/imRmAttr.c24
-rw-r--r--libX11/modules/im/ximcp/imThaiIc.c18
-rw-r--r--libX11/modules/lc/def/lcDefConv.c3
-rw-r--r--libX11/modules/lc/gen/lcGenConv.c53
-rw-r--r--libX11/modules/om/generic/omGeneric.c43
11 files changed, 116 insertions, 168 deletions
diff --git a/libX11/modules/im/ximcp/imCallbk.c b/libX11/modules/im/ximcp/imCallbk.c
index 07921f8a1..4e091d8ef 100644
--- a/libX11/modules/im/ximcp/imCallbk.c
+++ b/libX11/modules/im/ximcp/imCallbk.c
@@ -553,10 +553,8 @@ static void
_free_memory_for_text(XIMText* text)
{
if (text) {
- if (text->string.multi_byte)
- Xfree(text->string.multi_byte);
- if (text->feedback)
- Xfree(text->feedback);
+ Xfree(text->string.multi_byte);
+ Xfree(text->feedback);
Xfree(text);
}
}
diff --git a/libX11/modules/im/ximcp/imDefIc.c b/libX11/modules/im/ximcp/imDefIc.c
index 9610a0f11..143bd5942 100644
--- a/libX11/modules/im/ximcp/imDefIc.c
+++ b/libX11/modules/im/ximcp/imDefIc.c
@@ -1595,10 +1595,9 @@ _XimProtoCreateIC(
ErrorOnCreatingIC:
_XimUnregisterFilter(ic);
- if (ic->private.proto.ic_resources)
- Xfree(ic->private.proto.ic_resources);
- if (ic->private.proto.ic_inner_resources)
- Xfree(ic->private.proto.ic_inner_resources);
+
+ Xfree(ic->private.proto.ic_resources);
+ Xfree(ic->private.proto.ic_inner_resources);
Xfree(ic);
return (XIC)NULL;
}
diff --git a/libX11/modules/im/ximcp/imDefIm.c b/libX11/modules/im/ximcp/imDefIm.c
index 9168135e1..9e877c0b4 100644
--- a/libX11/modules/im/ximcp/imDefIm.c
+++ b/libX11/modules/im/ximcp/imDefIm.c
@@ -1775,10 +1775,8 @@ _XimEncodingNegotiation(
detail_ptr, detail_len)))
goto free_preply;
- if (name_ptr)
- Xfree(name_ptr);
- if (detail_ptr)
- Xfree(detail_ptr);
+ Xfree(name_ptr);
+ Xfree(detail_ptr);
if(reply != preply)
Xfree(preply);
diff --git a/libX11/modules/im/ximcp/imDefLkup.c b/libX11/modules/im/ximcp/imDefLkup.c
index e88123493..dea7f66d5 100644
--- a/libX11/modules/im/ximcp/imDefLkup.c
+++ b/libX11/modules/im/ximcp/imDefLkup.c
@@ -599,10 +599,9 @@ _XimUnregCommitInfo(
if (!(info = ic->private.proto.commit_info))
return;
- if (info->string)
- Xfree(info->string);
- if (info->keysym)
- Xfree(info->keysym);
+
+ Xfree(info->string);
+ Xfree(info->keysym);
ic->private.proto.commit_info = info->next;
Xfree(info);
return;
@@ -696,10 +695,8 @@ _XimCommitRecv(
}
if (!(_XimRegCommitInfo(ic, string, string_len, keysym, keysym_len))) {
- if (string)
- Xfree(string);
- if (keysym)
- Xfree(keysym);
+ Xfree(string);
+ Xfree(keysym);
_XimError(im, ic, XIM_BadAlloc, (INT16)0, (CARD16)0, (char *)NULL);
return False;
}
diff --git a/libX11/modules/im/ximcp/imInt.c b/libX11/modules/im/ximcp/imInt.c
index ee9f45122..bb393e0e4 100644
--- a/libX11/modules/im/ximcp/imInt.c
+++ b/libX11/modules/im/ximcp/imInt.c
@@ -239,14 +239,11 @@ Error4 :
Xfree(im);
return NULL;
Error3 :
- if(im->core.im_name)
- Xfree(im->core.im_name);
+ Xfree(im->core.im_name);
Error2:
- if(im->core.res_class)
- Xfree(im->core.res_class);
+ Xfree(im->core.res_class);
Error1:
- if(im->core.res_name)
- Xfree(im->core.res_name);
+ Xfree(im->core.res_name);
Xfree(im);
return NULL;
}
diff --git a/libX11/modules/im/ximcp/imLcIm.c b/libX11/modules/im/ximcp/imLcIm.c
index 3ab2dfc16..f3678868c 100644
--- a/libX11/modules/im/ximcp/imLcIm.c
+++ b/libX11/modules/im/ximcp/imLcIm.c
@@ -131,13 +131,14 @@ XimFreeDefaultTree(
}
#endif
Xfree (b->tree);
- if (b->mb) Xfree (b->mb);
- if (b->wc) Xfree (b->wc);
- if (b->utf8) Xfree (b->utf8);
b->tree = NULL;
+ Xfree (b->mb);
b->mb = NULL;
+ Xfree (b->wc);
b->wc = NULL;
+ Xfree (b->utf8);
b->utf8 = NULL;
+
b->treeused = b->treesize = 0;
b->mbused = b->mbsize = 0;
b->wcused = b->wcsize = 0;
@@ -151,38 +152,30 @@ _XimLocalIMFree(
XimFreeDefaultTree(&im->private.local.base);
im->private.local.top = 0;
- if(im->core.im_resources) {
- Xfree(im->core.im_resources);
- im->core.im_resources = NULL;
- }
- if(im->core.ic_resources) {
- Xfree(im->core.ic_resources);
- im->core.ic_resources = NULL;
- }
- if(im->core.im_values_list) {
- Xfree(im->core.im_values_list);
- im->core.im_values_list = NULL;
- }
- if(im->core.ic_values_list) {
- Xfree(im->core.ic_values_list);
- im->core.ic_values_list = NULL;
- }
- if(im->core.styles) {
- Xfree(im->core.styles);
- im->core.styles = NULL;
- }
- if(im->core.res_name) {
- Xfree(im->core.res_name);
- im->core.res_name = NULL;
- }
- if(im->core.res_class) {
- Xfree(im->core.res_class);
- im->core.res_class = NULL;
- }
- if(im->core.im_name) {
- Xfree(im->core.im_name);
- im->core.im_name = NULL;
- }
+ Xfree(im->core.im_resources);
+ im->core.im_resources = NULL;
+
+ Xfree(im->core.ic_resources);
+ im->core.ic_resources = NULL;
+
+ Xfree(im->core.im_values_list);
+ im->core.im_values_list = NULL;
+
+ Xfree(im->core.ic_values_list);
+ im->core.ic_values_list = NULL;
+
+ Xfree(im->core.styles);
+ im->core.styles = NULL;
+
+ Xfree(im->core.res_name);
+ im->core.res_name = NULL;
+
+ Xfree(im->core.res_class);
+ im->core.res_class = NULL;
+
+ Xfree(im->core.im_name);
+ im->core.im_name = NULL;
+
if (im->private.local.ctom_conv) {
_XlcCloseConverter(im->private.local.ctom_conv);
im->private.local.ctom_conv = NULL;
@@ -576,19 +569,15 @@ _XimCreateDefaultTree(
encoding, 0, 1, &cachename, &size);
if (cachefd != -1) {
if (_XimLoadCache (cachefd, intname, encoding, size, im)) {
- if (tmpcachedir)
- Xfree (tmpcachedir);
- if (tmpname)
- Xfree (tmpname);
- if (cachename)
- Xfree (cachename);
+ Xfree (tmpcachedir);
+ Xfree (tmpname);
+ Xfree (cachename);
close (cachefd);
return;
}
close (cachefd);
}
- if (cachename)
- Xfree (cachename);
+ Xfree (cachename);
cachename = NULL;
}
@@ -603,12 +592,9 @@ _XimCreateDefaultTree(
euid, 0, &cachename, &size);
if (cachefd != -1) {
if (_XimLoadCache (cachefd, intname, encoding, size, im)) {
- if (tmpcachedir)
- Xfree (tmpcachedir);
- if (tmpname)
- Xfree (tmpname);
- if (cachename)
- Xfree (cachename);
+ Xfree (tmpcachedir);
+ Xfree (tmpname);
+ Xfree (cachename);
close (cachefd);
return;
}
@@ -618,12 +604,9 @@ _XimCreateDefaultTree(
#endif
if (! (fp = _XFopenFile (name, "r"))) {
- if (tmpcachedir)
- Xfree (tmpcachedir);
- if (tmpname)
- Xfree (tmpname);
- if (cachename)
- Xfree (cachename);
+ Xfree (tmpcachedir);
+ Xfree (tmpname);
+ Xfree (cachename);
return;
}
_XimParseStringFile(fp, im);
@@ -636,12 +619,9 @@ _XimCreateDefaultTree(
}
#endif
- if (tmpcachedir)
- Xfree (tmpcachedir);
- if (tmpname)
- Xfree (tmpname);
- if (cachename)
- Xfree (cachename);
+ Xfree (tmpcachedir);
+ Xfree (tmpname);
+ Xfree (cachename);
}
static XIMMethodsRec Xim_im_local_methods = {
diff --git a/libX11/modules/im/ximcp/imRmAttr.c b/libX11/modules/im/ximcp/imRmAttr.c
index ad5290ee5..9d4e46258 100644
--- a/libX11/modules/im/ximcp/imRmAttr.c
+++ b/libX11/modules/im/ximcp/imRmAttr.c
@@ -972,8 +972,7 @@ _XimEncodePreeditValue(
if (!p->value)
return False;
- if (ic->private.proto.preedit_font)
- Xfree(ic->private.proto.preedit_font);
+ Xfree(ic->private.proto.preedit_font);
list_ret = XFontsOfFontSet((XFontSet)p->value,
&struct_list, &name_list);
@@ -1024,8 +1023,7 @@ _XimEncodeStatusValue(
if (!p->value)
return False;
- if (ic->private.proto.status_font)
- Xfree(ic->private.proto.status_font);
+ Xfree(ic->private.proto.status_font);
list_ret = XFontsOfFontSet((XFontSet)p->value,
&struct_list, &name_list);
@@ -1243,8 +1241,7 @@ _XimEncodeSavedStatusValue(
if (!value)
return False;
- if (ic->private.proto.status_font)
- Xfree(ic->private.proto.status_font);
+ Xfree(ic->private.proto.status_font);
list_ret = XFontsOfFontSet((XFontSet)value,
&struct_list, &name_list);
@@ -1460,10 +1457,9 @@ _XimGetAttributeID(
}
_XIMCompileResourceList(res, n);
- if (im->core.im_resources)
- Xfree(im->core.im_resources);
- if (im->core.im_values_list)
- Xfree(im->core.im_values_list);
+ Xfree(im->core.im_resources);
+ Xfree(im->core.im_values_list);
+
im->core.im_resources = res;
im->core.im_num_resources = n;
im->core.im_values_list = values_list;
@@ -1506,10 +1502,10 @@ _XimGetAttributeID(
}
_XIMCompileResourceList(res, n);
- if (im->core.ic_resources)
- Xfree(im->core.ic_resources);
- if (im->core.ic_values_list)
- Xfree(im->core.ic_values_list);
+
+ Xfree(im->core.ic_resources);
+ Xfree(im->core.ic_values_list);
+
im->core.ic_resources = res;
im->core.ic_num_resources = n;
im->core.ic_values_list = values_list;
diff --git a/libX11/modules/im/ximcp/imThaiIc.c b/libX11/modules/im/ximcp/imThaiIc.c
index 90da143f6..313734072 100644
--- a/libX11/modules/im/ximcp/imThaiIc.c
+++ b/libX11/modules/im/ximcp/imThaiIc.c
@@ -65,18 +65,20 @@ _XimThaiDestroyIC(
if(((Xim)ic->core.im)->private.local.current_ic == (XIC)ic) {
_XimThaiUnSetFocus(xic);
}
- if(ic->private.local.ic_resources) {
- Xfree(ic->private.local.ic_resources);
- ic->private.local.ic_resources = NULL;
- }
- if (b->tree) Xfree (b->tree);
- if (b->mb) Xfree (b->mb);
- if (b->wc) Xfree (b->wc);
- if (b->utf8) Xfree (b->utf8);
+ Xfree(ic->private.local.ic_resources);
+ ic->private.local.ic_resources = NULL;
+
+ Xfree (b->tree);
b->tree = NULL;
+
+ Xfree (b->mb);
b->mb = NULL;
+
+ Xfree (b->wc);
b->wc = NULL;
+
+ Xfree (b->utf8);
b->utf8 = NULL;
return;
}
diff --git a/libX11/modules/lc/def/lcDefConv.c b/libX11/modules/lc/def/lcDefConv.c
index 3cd5c22c9..e1f02289b 100644
--- a/libX11/modules/lc/def/lcDefConv.c
+++ b/libX11/modules/lc/def/lcDefConv.c
@@ -563,9 +563,8 @@ static void
close_converter(
XlcConv conv)
{
- if (conv->state)
- Xfree(conv->state);
+ Xfree(conv->state);
Xfree(conv);
}
diff --git a/libX11/modules/lc/gen/lcGenConv.c b/libX11/modules/lc/gen/lcGenConv.c
index 1f7c301f5..eede76807 100644
--- a/libX11/modules/lc/gen/lcGenConv.c
+++ b/libX11/modules/lc/gen/lcGenConv.c
@@ -753,7 +753,7 @@ mbstowcs_org(
CodeSet codeset = NULL;
- const char *inbufptr = *from;
+ const char *inbufptr;
wchar_t *outbufptr = (wchar_t *) *to;
int from_size = *from_left;
@@ -764,6 +764,8 @@ mbstowcs_org(
return( 0 );
}
+ inbufptr = *from;
+
while (*from_left && *to_left) {
ch = *inbufptr++;
@@ -1223,8 +1225,7 @@ stdc_wcstocts(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1252,7 +1253,7 @@ ctstowcs(
CodeSet codeset = NULL;
XlcCharSet charset_tmp;
- const char *inbufptr = *from;
+ const char *inbufptr;
wchar_t *outbufptr = (wchar_t *) *to;
int from_size = *from_left;
@@ -1262,6 +1263,7 @@ ctstowcs(
_XlcResetConverter(conv);
return( 0 );
}
+ inbufptr = *from;
while (*from_left && *to_left) {
@@ -1437,7 +1439,7 @@ cstowcs(
CodeSet codeset = NULL;
XlcCharSet charset, charset_tmp;
- const char *inbufptr = *from;
+ const char *inbufptr;
wchar_t *outbufptr = (wchar_t *) *to;
int from_size = *from_left;
@@ -1445,6 +1447,8 @@ cstowcs(
return( 0 );
}
+ inbufptr = *from;
+
charset = (XlcCharSet) args[0];
while (*from_left && *to_left) {
@@ -1543,8 +1547,7 @@ stdc_ctstowcs(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1579,8 +1582,7 @@ stdc_cstowcs(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1615,8 +1617,7 @@ mbstocts(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1643,7 +1644,7 @@ mbstostr(
CodeSet codeset = NULL;
- const char *inbufptr = *from;
+ const char *inbufptr;
char *outbufptr = *to;
int from_size = *from_left;
@@ -1654,6 +1655,8 @@ mbstostr(
return( 0 );
}
+ inbufptr = *from;
+
while (*from_left && *to_left) {
ch = *inbufptr++;
@@ -1758,7 +1761,7 @@ mbtocs(
CodeSet codeset = NULL;
XlcCharSet charset = NULL;
- const char *inbufptr = *from;
+ const char *inbufptr;
char *outbufptr = *to;
int from_size = *from_left;
@@ -1769,6 +1772,8 @@ mbtocs(
return( 0 );
}
+ inbufptr = *from;
+
while (*from_left && *to_left) {
ch = *inbufptr++;
@@ -2062,8 +2067,7 @@ stdc_wcstostr(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2337,8 +2341,7 @@ ctstombs(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2373,8 +2376,7 @@ cstombs(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2582,8 +2584,7 @@ stdc_strtowcs(
goto ret;
ret:
- if (buf)
- Xfree(buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2596,14 +2597,8 @@ static void
close_converter(
XlcConv conv)
{
- if (conv->state) {
- Xfree(conv->state);
- }
-
- if (conv->methods) {
- Xfree(conv->methods);
- }
-
+ Xfree(conv->state);
+ Xfree(conv->methods);
Xfree(conv);
}
diff --git a/libX11/modules/om/generic/omGeneric.c b/libX11/modules/om/generic/omGeneric.c
index 0d202c0f6..a835f00d7 100644
--- a/libX11/modules/om/generic/omGeneric.c
+++ b/libX11/modules/om/generic/omGeneric.c
@@ -196,16 +196,12 @@ init_fontset(
return True;
err:
- if(font_set->font_data)
- Xfree(font_set->font_data);
- if(font_set->substitute)
- Xfree(font_set->substitute);
- if(font_set->vmap)
- Xfree(font_set->vmap);
- if(font_set->vrotate)
- Xfree(font_set->vrotate);
- if(font_set)
- Xfree(font_set);
+
+ Xfree(font_set->font_data);
+ Xfree(font_set->substitute);
+ Xfree(font_set->vmap);
+ Xfree(font_set->vrotate);
+ Xfree(font_set);
gen->font_set = (FontSet) NULL;
gen->font_set_num = 0;
return False;
@@ -504,8 +500,8 @@ init_core_part(
return True;
err:
- if (font_name_list)
- Xfree(font_name_list);
+
+ Xfree(font_name_list);
Xfree(font_struct_list);
return False;
@@ -1486,24 +1482,15 @@ destroy_oc(
*/
/* For VW/UDC end */
- if (oc->core.base_name_list)
- Xfree(oc->core.base_name_list);
-
- if (oc->core.font_info.font_name_list)
- XFreeStringList(oc->core.font_info.font_name_list);
-
- if (oc->core.font_info.font_struct_list) {
- Xfree(oc->core.font_info.font_struct_list);
- }
-
- if (oc->core.missing_list.charset_list)
- XFreeStringList(oc->core.missing_list.charset_list);
+ Xfree(oc->core.base_name_list);
+ XFreeStringList(oc->core.font_info.font_name_list);
+ Xfree(oc->core.font_info.font_struct_list);
+ XFreeStringList(oc->core.missing_list.charset_list);
#ifdef notdef
- if (oc->core.res_name)
- Xfree(oc->core.res_name);
- if (oc->core.res_class)
- Xfree(oc->core.res_class);
+
+ Xfree(oc->core.res_name);
+ Xfree(oc->core.res_class);
#endif
Xfree(oc);