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)
Sat, Jan 18, 4:39 PM
Unknown Object (File)
Tue, Jan 14, 3:54 PM
Unknown Object (File)
Wed, Jan 1, 7:45 PM
Unknown Object (File)
Dec 8 2024, 3:59 PM
Unknown Object (File)
Dec 7 2024, 9:39 PM
Unknown Object (File)
Nov 16 2024, 10:24 AM
Unknown Object (File)
Oct 26 2024, 12:00 AM
Unknown Object (File)
Oct 25 2024, 11:59 PM
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 Not Applicable
Unit
Tests Not Applicable

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.