CodeQL IncorrectNotOperatorUsage.ql rtrDcmppose.c rtrCLEAR() usages
Maybe it was a single bit and '!' operator inverted a single bit, but it appears to be a 4-bit mask today. TODO check rtrMARKED() this looks like it uses '&' operator is in use but from the context of a bitmask maybe this should be '|' operator.
This commit is contained in:
parent
ca9229b35a
commit
6a537c4659
|
|
@ -53,6 +53,7 @@
|
||||||
|
|
||||||
/* rtrMARK(t,s) Tile * t; int s;
|
/* rtrMARK(t,s) Tile * t; int s;
|
||||||
* Mark the indicated horizontal tile edge as a valid channel boundary.
|
* Mark the indicated horizontal tile edge as a valid channel boundary.
|
||||||
|
* FIXME this looks suspect, maybe it should be '|' operator and not '&'.
|
||||||
*/
|
*/
|
||||||
#define rtrMARK(t,s) \
|
#define rtrMARK(t,s) \
|
||||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(s))))
|
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(s))))
|
||||||
|
|
@ -61,7 +62,7 @@
|
||||||
* Clear the indicated horizontal tile edge as a valid channel boundary.
|
* Clear the indicated horizontal tile edge as a valid channel boundary.
|
||||||
*/
|
*/
|
||||||
#define rtrCLEAR(t,s) \
|
#define rtrCLEAR(t,s) \
|
||||||
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(!s))))
|
((t)->ti_client = INT2CD((((int) CD2INT((t)->ti_client))&(~s))))
|
||||||
|
|
||||||
/* Private Procedures */
|
/* Private Procedures */
|
||||||
int rtrSrPaint();
|
int rtrSrPaint();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue