Page MenuHomeFreeBSD

Improve KASSERTs in rack.c
ClosedPublic

Authored by tuexen on Nov 17 2018, 8:41 PM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 20862

Event Timeline

tuexen created this revision.Nov 17 2018, 8:41 PM
Herald added a subscriber: imp. · View Herald Transcript
rrs accepted this revision.Nov 20 2018, 12:57 PM
This revision is now accepted and ready to land.Nov 20 2018, 12:57 PM
tuexen updated this revision to Diff 50732.Nov 21 2018, 11:30 AM

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

This revision now requires review to proceed.Nov 21 2018, 11:30 AM
tuexen updated this revision to Diff 50736.Nov 21 2018, 11:32 AM

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

rrs accepted this revision.Nov 21 2018, 12:30 PM

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.