diff mercurial/mpatch.c @ 1978:10606ee61107

do proper typecasting on malloc() and calloc() calls to support build on Solaris 2.6 using Sun Pro SC4.0 (C++ 4.1) compiler.
author TK Soh <teekaysoh@yahoo.com>
date Mon, 20 Mar 2006 08:46:29 +0100
parents 299c3e26ee45
children 8f9660c568b8 441ea218414e
line wrap: on
line diff
--- a/mercurial/mpatch.c	Sun Mar 19 21:26:58 2006 +0100
+++ b/mercurial/mpatch.c	Mon Mar 20 08:46:29 2006 +0100
@@ -58,9 +58,9 @@
 {
 	struct flist *a = NULL;
 
-	a = malloc(sizeof(struct flist));
+	a = (struct flist *)malloc(sizeof(struct flist));
 	if (a) {
-		a->base = malloc(sizeof(struct frag) * size);
+		a->base = (struct frag *)malloc(sizeof(struct frag) * size);
 		if (!a->base) {
 			free(a);
 			a = NULL;