diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-15 14:49:12 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-15 14:49:12 +0000 |
commit | e8c9c3c477d68e10719d829ede6f4cb3087f0efd (patch) | |
tree | 5b284e2af115632158b761f698421b19e8f22bed /src/sync-ftfw.c | |
parent | c60b7e984e8907f15439d07e88dad8a23c86cf2b (diff) | |
download | conntrack-tools-e8c9c3c477d68e10719d829ede6f4cb3087f0efd.tar.gz conntrack-tools-e8c9c3c477d68e10719d829ede6f4cb3087f0efd.zip |
more list_empty() use instead of directly check the header
Diffstat (limited to 'src/sync-ftfw.c')
-rw-r--r-- | src/sync-ftfw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c index ce58466..11febed 100644 --- a/src/sync-ftfw.c +++ b/src/sync-ftfw.c @@ -274,12 +274,9 @@ static void ftfw_send(struct nethdr *net, struct us_conntrack *u) cn = (struct cache_ftfw *) cache_get_extra(STATE_SYNC(internal), u); - if (cn->rs_list.next == &cn->rs_list && - cn->rs_list.prev == &cn->rs_list) - goto insert; + if (!list_empty(&cn->rs_list) + list_del(&cn->rs_list); - list_del_init(&cn->rs_list); -insert: cn->seq = net->seq; list_add(&cn->rs_list, &rs_list); break; |