Ensure variable name reflect actual functionality (bcast -> nwork).
@@ -506,8 +506,8 @@ add_host_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, const GPa
int hits = 0;
unsigned i;
- struct in6_addr addr6, mask6, bcast6;
- struct in_addr addr4, mask4, bcast4;
+ struct in6_addr addr6, mask6, nwork6;
+ struct in_addr addr4, mask4, nwork4;
const char *m4 = "255.255.255.0";
const char *m6 = "ffff:ffff:ffff:ffff:0000:0000:0000:0000";
@@ -523,9 +523,9 @@ add_host_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, const GPa
if (1 == inet_pton (AF_INET, data, &addr4)) {
if (1 == inet_pton (AF_INET, m4, &mask4)) {
memset (buf4, 0, sizeof *buf4);
- bcast4.s_addr = addr4.s_addr & mask4.s_addr;
+ nwork4.s_addr = addr4.s_addr & mask4.s_addr;
- if (inet_ntop (AF_INET, &bcast4, buf4, INET_ADDRSTRLEN) != NULL) {
+ if (inet_ntop (AF_INET, &nwork4, buf4, INET_ADDRSTRLEN) != NULL) {
set_host (item, h, panel, buf4, hits);
free (data);
}
@@ -534,10 +534,10 @@ add_host_to_holder (GRawDataItem item, GHolder * h, GRawDataType type, const GPa
if (1 == inet_pton (AF_INET6, m6, &mask6)) {
memset (buf6, 0, sizeof *buf6);
for (i = 0; i < 16; i++) {
- bcast6.s6_addr[i] = addr6.s6_addr[i] & mask6.s6_addr[i];
+ nwork6.s6_addr[i] = addr6.s6_addr[i] & mask6.s6_addr[i];
}
- if (inet_ntop (AF_INET6, &bcast6, buf6, INET6_ADDRSTRLEN) != NULL) {
+ if (inet_ntop (AF_INET6, &nwork6, buf6, INET6_ADDRSTRLEN) != NULL) {
set_host (item, h, panel, buf6, hits);
free (data);
}
