Date: Wed, 14 Nov 2012 18:57:49 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219783 for review Message-ID: <201211141857.qAEIvn05013754@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219783?ac=10 Change 219783 by brooks@brooks_zenith on 2012/11/14 18:57:26 Small cleanups to trivial malloc. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/libexec/readpng-cheri/malloc.c#2 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/libexec/readpng-cheri/malloc.c#2 (text+ko) ==== @@ -37,7 +37,7 @@ size_t _sb_heaplen; void * -malloc(size_t size __unused) +malloc(size_t size) { size_t rsize; char *ptr; @@ -45,7 +45,7 @@ rsize = roundup2(size, 4096); ptr = _sb_heapbase; _sb_heaplen -= rsize; - _sb_heapbase = (char *)_sb_heapbase + rsize; + _sb_heapbase = ptr + rsize; return(ptr); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211141857.qAEIvn05013754>