Alexandre Julliard : wmc: Get rid of xmalloc casts.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 28 05:09:13 CDT 2006


Module: wine
Branch: master
Commit: 1916cb1e198647c33165375c34de166163264331
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=1916cb1e198647c33165375c34de166163264331

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Aug 26 21:35:32 2006 +0200

wmc: Get rid of xmalloc casts.

---

 tools/wmc/mcy.y   |    2 +-
 tools/wmc/utils.c |    6 +++---
 tools/wmc/wmc.c   |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

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 void do_add_token(tok_e type, tok
 
 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 @@ char *dup_basename(const char *name, con
 	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 9a19654..858606f 100644
--- a/tools/wmc/wmc.c
+++ b/tools/wmc/wmc.c
@@ -152,7 +152,7 @@ #endif
 	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++)
 	{




More information about the wine-cvs mailing list