Page MenuHomeFreeBSD

Improve KASSERTs in rack.c
ClosedPublic

Authored by tuexen on Nov 17 2018, 8:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 5:59 AM
Unknown Object (File)
Dec 12 2023, 2:22 AM
Unknown Object (File)
Dec 11 2023, 3:51 AM
Unknown Object (File)
Nov 18 2023, 11:28 PM
Unknown Object (File)
Nov 18 2023, 9:16 PM
Unknown Object (File)
Nov 18 2023, 9:16 PM
Unknown Object (File)
Nov 18 2023, 8:46 PM
Unknown Object (File)
Nov 15 2023, 12:54 AM
Subscribers

Details

Summary

PR229664 points out that two KASSERT checks will never be triggered, since an unsigned variable is tested for being negative.
This patch fixes the two tests and uses the same pattern for a third test, which ensures the same condition. This is for consistency.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20862

Event Timeline

This revision is now accepted and ready to land.Nov 20 2018, 12:57 PM

Use SEQ_LT instead of <= since sequence number arithmetic is used.

This revision now requires review to proceed.Nov 21 2018, 11:30 AM

Use SEQ_LEQ instead of <= since sequence number arithmetic needs to be used.

Good catch Michael!!!

This revision is now accepted and ready to land.Nov 21 2018, 12:30 PM
This revision was automatically updated to reflect the committed changes.