HomeFreeBSD

Address two incorrect calculations and enhance readability of PRR code

Description

Address two incorrect calculations and enhance readability of PRR code

  • address second instance of cwnd potentially becoming zero
  • fix sublte bug due to implicit int to uint typecase in max()
  • fix bug due to typo in hand-coded CEILING() function by using howmany() macro
  • use int instead of long, and add a missing long typecast
  • replace if conditionals with easier to read imax/imin (as in pseudocode)

Reviewed By: transport, kbowling
MFC after: 3 days
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D28813

Details

Provenance
rscheffAuthored on Feb 25 2021, 4:59 PM
Reviewer
transport
Differential Revision
D28813: Address two incorrect calculations and enhance readability of PRR code
Parents
rG8f3c71c85e5f: mkimg: Add support for offset if the source is an image
Branches
Unknown
Tags
Unknown