]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r296816:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Mar 2016 01:14:32 +0000 (01:14 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Mar 2016 01:14:32 +0000 (01:14 +0000)
commitd19b4dddf7670da59c59bbe8e40cc83de6e16ace
tree899c47d448bb3542dea1eab8661abeeedabddbc8
parent3a938b8ae5c0d3448e49d4419e4eecf62c5a58c9
MFC r296816:

libdtrace: use calloc(3) instead of malloc(3) when it makes sense.

calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).

In one case, pointed out by Mark[1], this also cleans up a calculation.

Reviewed by: markj [1]

git-svn-id: svn://svn.freebsd.org/base/stable/10@297129 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
cddl/contrib/opensolaris/lib/libdtrace/common/dt_regset.c
cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c