mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-19 21:03:57 -07:00
AntiRecursion cleanup and some other minor things.
This commit is contained in:
parent
05b2c0743f
commit
9aee72099e
3 changed files with 7 additions and 5 deletions
|
@ -105,8 +105,9 @@ public:
|
|||
const _ArItem *const end = i + ZT_ANTIRECURSION_HISTORY_SIZE;
|
||||
while (i != end) {
|
||||
#ifdef ZT_NO_TYPE_PUNNING
|
||||
if (!memcmp(pp,i->tail,32))
|
||||
if (!memcmp(pp,i->tail,32)) {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
const uint64_t *t = i->tail;
|
||||
const uint64_t *p = reinterpret_cast<const uint64_t *>(pp);
|
||||
|
@ -114,8 +115,9 @@ public:
|
|||
bits |= *(t++) ^ *(p++);
|
||||
bits |= *(t++) ^ *(p++);
|
||||
bits |= *t ^ *p;
|
||||
if (!bits)
|
||||
if (!bits) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
++i;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue