Mercurial > hg > mercurial-crew-with-dirclash
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 +++ b/mercurial/mpatch.c @@ -58,9 +58,9 @@ static struct flist *lalloc(int size) { 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;