802.15.4 empty body in if statement
Brought to you by:
heidemann,
tom_henderson
Reported by Maxime de Roucy:
Compiling with -Wextra option gave me :
wpan/p802_15_4csmaca.cc:424: warning: suggest braces around empty body
in an 'if' statement
wpan/p802_15_4csmaca.cc:431: warning: suggest braces around empty body
in an 'if' statement
In fact the code is :
if (canProceed(wtime));
backoffHandler();
Where the if have absolutely no effect ..
My question : does we change the code for :
canProceed(wtime);
backoffHandler();
or
if (canProceed(wtime))
{
backoffHandler();
}