diff options
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/ciscodump.c | 4 | ||||
-rw-r--r-- | extcap/sshdump.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index 74df9475d5..23a8d1b35c 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -110,10 +110,10 @@ static char* interfaces_list_to_filter(GSList* interfaces, unsigned int remote_p g_string_append_printf(filter, "deny tcp host %s any eq %u, deny tcp any eq %u host %s", (char*)interfaces->data, remote_port, remote_port, (char*)interfaces->data); cur = g_slist_next(interfaces); - while (cur->next != NULL) { + while (cur) { g_string_append_printf(filter, ", deny tcp host %s any eq %u, deny tcp any eq %u host %s", (char*)cur->data, remote_port, remote_port, (char*)cur->data); - cur = cur->next; + cur = g_slist_next(cur); } g_string_append_printf(filter, ", permit ip any any"); } diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 77dc11ad04..92ea9fded0 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -268,9 +268,9 @@ static char* interfaces_list_to_filter(GSList* interfaces, unsigned int remote_p } else { g_string_append_printf(filter, "not ((host %s", (char*)interfaces->data); cur = g_slist_next(interfaces); - while (cur->next != NULL) { + while (cur) { g_string_append_printf(filter, " or host %s", (char*)cur->data); - cur = cur->next; + cur = g_slist_next(cur); } g_string_append_printf(filter, ") and port %u)", remote_port); } |