]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
powerpc: make some use of mallocarray(9).
authorpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:10:40 +0000 (21:10 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:10:40 +0000 (21:10 +0000)
commite1b1b7bd9681888eafcdca55830f6e83d61e4946
tree1ebf51ed8c80d77b7e24995d9f55909868cfffb8
parentaf8b614ef3330a479f6d31592c9a41da4ca7fe10
powerpc: make some use of mallocarray(9).

Focus on code where we are doing multiplications within malloc(9). None of
these ire likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.

X-Differential revision: https://reviews.freebsd.org/D13837
sys/powerpc/pseries/phyp_vscsi.c