dev_driver_tools icon indicating copy to clipboard operation
dev_driver_tools copied to clipboard

RGP/DevDriverComponents/listener/routerCore.cpp:401: bad expression ?

Open dcb314 opened this issue 6 years ago • 1 comments

Source code is

if (IsOutOfBandMessage(message) & !IsValidOutOfBandMessage(message))

Maybe better code

if (IsOutOfBandMessage(message) && !IsValidOutOfBandMessage(message))

dcb314 avatar Aug 16 '18 15:08 dcb314

Hi,

I spoke to the team responsible for this and they say that this code is legit; apparently it’s more optimal to use this rather than the logical AND. It has the same effect but it’s not really intuitive. Is it causing a compiler warning? If so it should be fixed. At the very least, it should be commented to indicate that it is intended behavior. I'll update this post when the fix has been checked in

ahosier avatar Sep 07 '18 15:09 ahosier