]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pkg(7): address minor nits (mostly clang-analyze complaints)
authorKyle Evans <kevans@FreeBSD.org>
Fri, 12 Feb 2021 00:58:27 +0000 (18:58 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Mon, 22 Feb 2021 16:30:26 +0000 (10:30 -0600)
commit5d07525b81af284c2be4ae438bcf000785122cf2
treeafbc51b40a42050bfc1fae9e798489c8852ad114
parent5de955fe436a208f93359e84a059b74bb0169ce6
pkg(7): address minor nits (mostly clang-analyze complaints)

- One (1) spurious whitespace.
- One (1) occurrence of "random(3) bad, arc4random(3)" good.
- Three (3) writes that will never be seen.

The latter two points are complaints from clang-analyze. Switching to
arc4random(3) is decidedly a good idea because we weren't doing any kind
of PRNG seeding anyways. The discarded assignments are arguably good
for future-proofing, but it's better to improve the S/N ratio from
clang-analyze.

Approved by: re (gjb)

(cherry picked from commit b2c4ca8d2872bc4410626f2b1ceafa49de5828ce)
(cherry picked from commit 9ec09b04df17b3601e6f5ae8664c6ab81e1e4783)
usr.sbin/pkg/dns_utils.c
usr.sbin/pkg/pkg.c