summaryrefslogtreecommitdiff
path: root/node/MulticastGroup.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-04 14:25:07 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-04 14:25:07 -0700
commit93f9b4392dbf1a2c77fa57aa80ae888aff4fbd10 (patch)
treee4b75748546b518237bbdb3ac36cdf8c8103fc89 /node/MulticastGroup.hpp
parent6df954674289b22c894b16c0969ddca535ef8216 (diff)
downloadinfinitytier-93f9b4392dbf1a2c77fa57aa80ae888aff4fbd10.tar.gz
infinitytier-93f9b4392dbf1a2c77fa57aa80ae888aff4fbd10.zip
Enable configuration of multicast algorithm parameters in netconf
Diffstat (limited to 'node/MulticastGroup.hpp')
-rw-r--r--node/MulticastGroup.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/node/MulticastGroup.hpp b/node/MulticastGroup.hpp
index 659b05d8..cdb8b6db 100644
--- a/node/MulticastGroup.hpp
+++ b/node/MulticastGroup.hpp
@@ -124,13 +124,11 @@ public:
{
char hex[17];
unsigned int hexlen = 0;
- while ((*s)&&(*s != '/')&&(hexlen < sizeof(hex) - 1))
+ while ((*s)&&(*s != '/')&&(hexlen < (sizeof(hex) - 1)))
hex[hexlen++] = *s;
hex[hexlen] = (char)0;
_mac.fromString(hex);
- if (*s == '/')
- _adi = (uint32_t)Utils::hexStrToULong(++s);
- else _adi = 0;
+ _adi = (*s == '/') ? (uint32_t)Utils::hexStrToULong(s + 1) : (uint32_t)0;
}
/**