diff --git a/tools/wmc/mcy.y b/tools/wmc/mcy.y index 61b7fd18df1..32458be9173 100644 --- a/tools/wmc/mcy.y +++ b/tools/wmc/mcy.y @@ -437,7 +437,7 @@ static void do_add_token(tok_e type, token_t *tok, const char *code) 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 c91902d62bb..6b2de4cc279 100644 --- a/tools/wmc/utils.c +++ b/tools/wmc/utils.c @@ -128,7 +128,7 @@ char *dup_basename(const char *name, const char *ext) 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 *xstrdup(const char *str) 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 *xunistrdup(const WCHAR * str) 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 9a19654aa71..858606f0103 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -152,7 +152,7 @@ int main(int argc,char *argv[]) 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++) {