summaryrefslogtreecommitdiff
path: root/lib/libX11/modules/im
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-03 10:21:32 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2016-11-03 10:21:32 +0000
commit8bbe3c422ab753407cf561f700944f741e927c3c (patch)
tree14baf6a2af8dedcb0168e504edd77502c1ebcedb /lib/libX11/modules/im
parent84525cc973107a701917a245211dd4197b0d4f35 (diff)
Update to libX11 1.6.4
Diffstat (limited to 'lib/libX11/modules/im')
-rw-r--r--lib/libX11/modules/im/ximcp/imExten.c2
-rw-r--r--lib/libX11/modules/im/ximcp/imLcIm.c6
-rw-r--r--lib/libX11/modules/im/ximcp/imLcPrs.c6
3 files changed, 6 insertions, 8 deletions
diff --git a/lib/libX11/modules/im/ximcp/imExten.c b/lib/libX11/modules/im/ximcp/imExten.c
index 58de32e60..c2e48a891 100644
--- a/lib/libX11/modules/im/ximcp/imExten.c
+++ b/lib/libX11/modules/im/ximcp/imExten.c
@@ -367,7 +367,7 @@ _XimParseExtensionList(
if (!(n = _XimCountNumberOfExtension(data[0], (CARD8 *)&data[1])))
return True;
- buf = (CARD8 *)&data[1];;
+ buf = (CARD8 *)&data[1];
for (i = 0; i < n; i++) {
len = *((INT16 *)(&buf[2]));
for (j = 0; j < num; j++) {
diff --git a/lib/libX11/modules/im/ximcp/imLcIm.c b/lib/libX11/modules/im/ximcp/imLcIm.c
index f3678868c..c19695df8 100644
--- a/lib/libX11/modules/im/ximcp/imLcIm.c
+++ b/lib/libX11/modules/im/ximcp/imLcIm.c
@@ -447,7 +447,7 @@ _XimWriteCachedDefaultTree(
+ XIM_CACHE_TREE_ALIGNMENT-1) & -XIM_CACHE_TREE_ALIGNMENT;
DefTreeBase *b = &im->private.local.base;
- if (! b->tree && ! (b->tree = Xmalloc (sizeof(DefTree))) )
+ if (! b->tree && ! (b->tree = Xcalloc (1, sizeof(DefTree))) )
return;
if (! b->mb && ! (b->mb = Xmalloc (1)) )
return;
@@ -457,13 +457,11 @@ _XimWriteCachedDefaultTree(
return;
/* First entry is always unused */
- memset (b->tree, 0, sizeof(DefTree));
b->mb[0] = 0;
b->wc[0] = 0;
b->utf8[0] = 0;
- m = Xmalloc (msize);
- memset (m, 0, msize);
+ m = Xcalloc (1, msize);
m->id = XIM_CACHE_MAGIC;
m->version = XIM_CACHE_VERSION;
m->top = im->private.local.top;
diff --git a/lib/libX11/modules/im/ximcp/imLcPrs.c b/lib/libX11/modules/im/ximcp/imLcPrs.c
index 9bb45ff31..60215c706 100644
--- a/lib/libX11/modules/im/ximcp/imLcPrs.c
+++ b/lib/libX11/modules/im/ximcp/imLcPrs.c
@@ -496,12 +496,12 @@ parseline(
token = nexttoken(fp, tokenbuf, &lastch);
if (token != KEY && token != STRING)
goto error;
- if ((filename = TransFileName(im, tokenbuf)) == NULL)
- goto error;
if (++depth > 100)
goto error;
+ if ((filename = TransFileName(im, tokenbuf)) == NULL)
+ goto error;
infp = _XFopenFile(filename, "r");
- Xfree(filename);
+ Xfree(filename);
if (infp == NULL)
goto error;
parsestringfile(infp, im, depth);