Brenton/curly braces (#1971)
* fix formatting * properly adjust various lines breakup multiple statements onto multiple lines * insert {} around if, for, etc.
This commit is contained in:
parent
e6802690b8
commit
f73e51e94c
57 changed files with 2247 additions and 1082 deletions
|
@ -23,8 +23,9 @@ namespace ZeroTier {
|
|||
|
||||
int CertificateOfOwnership::verify(const RuntimeEnvironment *RR,void *tPtr) const
|
||||
{
|
||||
if ((!_signedBy)||(_signedBy != Network::controllerFor(_networkId)))
|
||||
if ((!_signedBy)||(_signedBy != Network::controllerFor(_networkId))) {
|
||||
return -1;
|
||||
}
|
||||
const Identity id(RR->topology->getIdentity(tPtr,_signedBy));
|
||||
if (!id) {
|
||||
RR->sw->requestWhois(tPtr,RR->node->now(),_signedBy);
|
||||
|
@ -45,12 +46,14 @@ bool CertificateOfOwnership::_owns(const CertificateOfOwnership::Thing &t,const
|
|||
if (_thingTypes[i] == (uint8_t)t) {
|
||||
unsigned int k = 0;
|
||||
while (k < l) {
|
||||
if (reinterpret_cast<const uint8_t *>(v)[k] != _thingValues[i][k])
|
||||
if (reinterpret_cast<const uint8_t *>(v)[k] != _thingValues[i][k]) {
|
||||
break;
|
||||
}
|
||||
++k;
|
||||
}
|
||||
if (k == l)
|
||||
if (k == l) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue