wmc: Get rid of xmalloc casts.
diff --git a/tools/wmc/mcy.y b/tools/wmc/mcy.y
index 61b7fd1..32458be 100644
--- a/tools/wmc/mcy.y
+++ b/tools/wmc/mcy.y
@@ -437,7 +437,7 @@
static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg)
{
- lanmsg_t *lmp = (lanmsg_t *)xmalloc(sizeof(lanmsg_t));
+ lanmsg_t *lmp = xmalloc(sizeof(lanmsg_t));
lmp->lan = lcp->language;
lmp->cp = lcp->codepage;
lmp->msg = msg;
diff --git a/tools/wmc/utils.c b/tools/wmc/utils.c
index c91902d..6b2de4c 100644
--- a/tools/wmc/utils.c
+++ b/tools/wmc/utils.c
@@ -128,7 +128,7 @@
namelen = strlen(name);
/* +4 for later extension and +1 for '\0' */
- base = (char *)xmalloc(namelen +4 +1);
+ base = xmalloc(namelen +4 +1);
strcpy(base, name);
if(!strcasecmp(name + namelen-extlen, ext))
{
@@ -172,7 +172,7 @@
char *s;
assert(str != NULL);
- s = (char *)xmalloc(strlen(str)+1);
+ s = xmalloc(strlen(str)+1);
return strcpy(s, str);
}
@@ -198,7 +198,7 @@
WCHAR *s;
assert(str != NULL);
- s = (WCHAR *)xmalloc((unistrlen(str)+1) * sizeof(WCHAR));
+ s = xmalloc((unistrlen(str)+1) * sizeof(WCHAR));
return unistrcpy(s, str);
}
diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c
index 9a19654..858606f 100644
--- a/tools/wmc/wmc.c
+++ b/tools/wmc/wmc.c
@@ -152,7 +152,7 @@
cmdlen = 4; /* for "wmc " */
for(i = 1; i < argc; i++)
cmdlen += strlen(argv[i]) + 1;
- cmdline = (char *)xmalloc(cmdlen);
+ cmdline = xmalloc(cmdlen);
strcpy(cmdline, "wmc ");
for(i = 1; i < argc; i++)
{