Page MenuHomeFreeBSD

pkg(7): address minor nits (mostly clang-analyze complaints)
ClosedPublic

Authored by kevans on Feb 7 2021, 6:58 PM.
Tags
None
Referenced Files
F137767742: D28525.id83731.diff
Tue, Nov 25, 3:51 PM
Unknown Object (File)
Tue, Nov 25, 1:35 AM
Unknown Object (File)
Tue, Nov 25, 1:35 AM
Unknown Object (File)
Tue, Nov 25, 1:35 AM
Unknown Object (File)
Tue, Nov 25, 1:34 AM
Unknown Object (File)
Wed, Nov 12, 8:28 AM
Unknown Object (File)
Fri, Nov 7, 5:58 PM
Unknown Object (File)
Oct 26 2025, 9:00 PM
Subscribers

Details

Summary
  • 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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable