summaryrefslogtreecommitdiffstats
path: root/ipset_ipporthash.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipset_ipporthash.c')
-rw-r--r--ipset_ipporthash.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/ipset_ipporthash.c b/ipset_ipporthash.c
index ce783ee..9249b2a 100644
--- a/ipset_ipporthash.c
+++ b/ipset_ipporthash.c
@@ -259,13 +259,11 @@ ipporthash_printips(struct set *set, void *data, u_int32_t len,
while (offset < len) {
ipptr = data + offset;
- if (*ipptr) {
- ip = (*ipptr>>16) + mysetdata->first_ip;
- port = (uint16_t) *ipptr;
- printf("%s,%s\n",
- ip_tostring(ip, options),
- port_tostring(port, options));
- }
+ ip = (*ipptr>>16) + mysetdata->first_ip;
+ port = (uint16_t) *ipptr;
+ printf("%s,%s\n",
+ ip_tostring(ip, options),
+ port_tostring(port, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}
@@ -296,13 +294,11 @@ ipporthash_saveips(struct set *set, void *data, u_int32_t len,
while (offset < len) {
ipptr = data + offset;
- if (*ipptr) {
- ip = (*ipptr>>16) + mysetdata->first_ip;
- port = (uint16_t) *ipptr;
- printf("-A %s %s,%s\n", set->name,
- ip_tostring(ip, options),
- port_tostring(port, options));
- }
+ ip = (*ipptr>>16) + mysetdata->first_ip;
+ port = (uint16_t) *ipptr;
+ printf("-A %s %s,%s\n", set->name,
+ ip_tostring(ip, options),
+ port_tostring(port, options));
offset += IPSET_VALIGN(sizeof(ip_set_ip_t), dont_align);
}
}