Page MenuHomeFreeBSD

Don't check aq64_minfree which is unsigned for negative values.
ClosedPublic

Authored by jhb on Aug 29 2016, 2:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 2:46 PM
Unknown Object (File)
Feb 9 2024, 1:07 AM
Unknown Object (File)
Feb 8 2024, 4:32 AM
Unknown Object (File)
Feb 4 2024, 8:31 PM
Unknown Object (File)
Jan 29 2024, 6:42 PM
Unknown Object (File)
Jan 25 2024, 8:09 AM
Unknown Object (File)
Nov 13 2023, 11:37 AM
Unknown Object (File)
Oct 25 2023, 5:53 AM
Subscribers

Details

Summary

Don't check aq64_minfree which is unsigned for negative values.

This fixes a tautological comparison warning.

pjg@ moved this comparison down in an earlier revision, but that doesn't
fix the warning. The commit message from that revision mentioned keeping
the comparison for compat with other systems, but there was no reviewed
by, so it isn't clear if that was a hypothetical case or a real one.

Test Plan
  • Compile tested.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Don't check aq64_minfree which is unsigned for negative values..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: rwatson.
rwatson edited edge metadata.

The comments could have to do with the au_qctrl structure, which uses "int", whereas the au_qctrl64 type uses "uint64_t". You can see the code handling the older structure a bit below this point, which likely has to do with compatibility with older Solaris/XNU versions rather than FreeBSD per se.

It should be OK to remove the check for the 64-bit version where the fields are 64-bit, although perhaps we should add a comment to make it obvious that this code is only robust if the fields are unsigned, which they are in OpenBSM.

This revision is now accepted and ready to land.Aug 29 2016, 4:22 PM
This revision was automatically updated to reflect the committed changes.