Change all statements of the form 'return BOOLEAN_EXPRESSION ? true : false;' to 'return BOOLEAN_EXPRESSION;'

This commit is contained in:
jay 2014-08-03 04:22:02 +00:00
parent 3c38c2099b
commit 68659157f6
3 changed files with 3 additions and 3 deletions

View file

@ -517,7 +517,7 @@ bool Target::timedOut(const struct timeval *now) {
used += TIMEVAL_MSEC_SUBTRACT(tv, htn.toclock_start);
}
return (used > o.host_timeout)? true : false;
return (used > o.host_timeout);
}

View file

@ -623,7 +623,7 @@ int NpingTarget::setNamedHost(bool val){
bool NpingTarget::isNamedHost(){
assert(this->namedhost==1 || this->namedhost==0 );
return (this->namedhost==1) ? true : false;
return (this->namedhost==1);
} /* End of isNamedHost() */

View file

@ -1868,7 +1868,7 @@ bool UltraScanInfo::sendOK(struct timeval *when) {
if (when)
*when = lowhtime;
return (TIMEVAL_MSEC_SUBTRACT(lowhtime, now) == 0) ? true : false;
return (TIMEVAL_MSEC_SUBTRACT(lowhtime, now) == 0);
}
/* Find a HostScanStats by its IP address in the incomplete and completed lists.