]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use a different approach to range check.
authorimp <imp@FreeBSD.org>
Mon, 15 Jul 2019 23:43:38 +0000 (23:43 +0000)
committerimp <imp@FreeBSD.org>
Mon, 15 Jul 2019 23:43:38 +0000 (23:43 +0000)
commit57d67012f6a753fe7473407d3e47cd9ff38f72cd
tree497d1f960e6bf4a4c80ae7045648cac40e27d1a9
parentb4823420024adbf85888356ad222502d7fbfb322
Use a different approach to range check.

gcc hates dt < CC_DT_NONE since it can never be true when dt is an unsigned
type. Since that's a compiler choice and may be affected by weird stuff, instead
use (unsigned)dt > CC_DT_UNKNOWN to test for bounds error since that will work
regardless of the signedness of dt.
sbin/camcontrol/camcontrol.c