aboutsummaryrefslogtreecommitdiff
path: root/libX11/modules/lc
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/modules/lc')
-rw-r--r--libX11/modules/lc/def/lcDefConv.c8
-rw-r--r--libX11/modules/lc/gen/lcGenConv.c28
-rw-r--r--libX11/modules/lc/xlocale/lcEuc.c4
-rw-r--r--libX11/modules/lc/xlocale/lcJis.c8
-rw-r--r--libX11/modules/lc/xlocale/lcSjis.c4
5 files changed, 26 insertions, 26 deletions
diff --git a/libX11/modules/lc/def/lcDefConv.c b/libX11/modules/lc/def/lcDefConv.c
index 12a48615e..3cd5c22c9 100644
--- a/libX11/modules/lc/def/lcDefConv.c
+++ b/libX11/modules/lc/def/lcDefConv.c
@@ -564,9 +564,9 @@ close_converter(
XlcConv conv)
{
if (conv->state)
- Xfree((char *) conv->state);
+ Xfree(conv->state);
- Xfree((char *) conv);
+ Xfree(conv);
}
static XlcConv
@@ -577,11 +577,11 @@ create_conv(
XlcConv conv;
State state;
- conv = (XlcConv) Xcalloc(1, sizeof(XlcConvRec));
+ conv = Xcalloc(1, sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
- state = (State) Xmalloc(sizeof(StateRec));
+ state = Xmalloc(sizeof(StateRec));
if (state == NULL) {
close_converter(conv);
return (XlcConv) NULL;
diff --git a/libX11/modules/lc/gen/lcGenConv.c b/libX11/modules/lc/gen/lcGenConv.c
index 1041dc709..1f7c301f5 100644
--- a/libX11/modules/lc/gen/lcGenConv.c
+++ b/libX11/modules/lc/gen/lcGenConv.c
@@ -342,7 +342,7 @@ byteM_parse_codeset(
continue;
for (j = 0; j < codeset->length; j++) {
- ch = *((unsigned char *)(inbufptr + j));
+ ch = *((const unsigned char *)(inbufptr + j));
byteM_rec = byteM[j];
byteinfo = byteM_rec.byteinfo;
@@ -1224,7 +1224,7 @@ stdc_wcstocts(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1544,7 +1544,7 @@ stdc_ctstowcs(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1580,7 +1580,7 @@ stdc_cstowcs(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -1616,7 +1616,7 @@ mbstocts(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2063,7 +2063,7 @@ stdc_wcstostr(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2338,7 +2338,7 @@ ctstombs(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2374,7 +2374,7 @@ cstombs(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2583,7 +2583,7 @@ stdc_strtowcs(
ret:
if (buf)
- Xfree((char *)buf);
+ Xfree(buf);
return (unconv_num1 + unconv_num2);
}
@@ -2597,14 +2597,14 @@ close_converter(
XlcConv conv)
{
if (conv->state) {
- Xfree((char *) conv->state);
+ Xfree(conv->state);
}
if (conv->methods) {
- Xfree((char *) conv->methods);
+ Xfree(conv->methods);
}
- Xfree((char *) conv);
+ Xfree(conv);
}
/* -------------------------------------------------------------------------- */
@@ -2619,11 +2619,11 @@ create_conv(
XlcConv conv;
State state;
- conv = (XlcConv) Xcalloc(1, sizeof(XlcConvRec));
+ conv = Xcalloc(1, sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
- conv->methods = (XlcConvMethods) Xmalloc(sizeof(XlcConvMethodsRec));
+ conv->methods = Xmalloc(sizeof(XlcConvMethodsRec));
if (conv->methods == NULL)
goto err;
*conv->methods = *methods;
diff --git a/libX11/modules/lc/xlocale/lcEuc.c b/libX11/modules/lc/xlocale/lcEuc.c
index 442e3090f..5b171a9f3 100644
--- a/libX11/modules/lc/xlocale/lcEuc.c
+++ b/libX11/modules/lc/xlocale/lcEuc.c
@@ -671,7 +671,7 @@ create_conv(
{
XlcConv conv;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = Xmalloc(sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
@@ -1363,7 +1363,7 @@ static void
close_converter(
XlcConv conv)
{
- Xfree((char *) conv);
+ Xfree(conv);
}
enum { MBSTOCS, WCSTOCS, MBTOCS, CSTOMBS, CSTOWCS, MBSTOWCS, WCSTOMBS,
diff --git a/libX11/modules/lc/xlocale/lcJis.c b/libX11/modules/lc/xlocale/lcJis.c
index 551862d9b..a6917cf9f 100644
--- a/libX11/modules/lc/xlocale/lcJis.c
+++ b/libX11/modules/lc/xlocale/lcJis.c
@@ -520,10 +520,10 @@ close_converter(
XlcConv conv)
{
if (conv->state) {
- Xfree((char *) conv->state);
+ Xfree(conv->state);
}
- Xfree((char *) conv);
+ Xfree(conv);
}
static XlcConv
@@ -534,11 +534,11 @@ create_conv(
XlcConv conv;
State state;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = Xmalloc(sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
- conv->methods = (XlcConvMethods) Xmalloc(sizeof(XlcConvMethodsRec));
+ conv->methods = Xmalloc(sizeof(XlcConvMethodsRec));
if (conv->methods == NULL)
goto err;
*conv->methods = *methods;
diff --git a/libX11/modules/lc/xlocale/lcSjis.c b/libX11/modules/lc/xlocale/lcSjis.c
index 74dd033ec..ac945570a 100644
--- a/libX11/modules/lc/xlocale/lcSjis.c
+++ b/libX11/modules/lc/xlocale/lcSjis.c
@@ -1420,7 +1420,7 @@ static void
close_converter(
XlcConv conv)
{
- Xfree((char *) conv);
+ Xfree(conv);
}
@@ -1431,7 +1431,7 @@ create_conv(
{
XlcConv conv;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = Xmalloc(sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;