diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2008-08-10 09:18:02 +0000 |
---|---|---|
committer | Sven Wegener <sven.wegener@stealer.net> | 2008-08-11 11:45:57 +0200 |
commit | 66a0be47200fff30f8c482ea584052c6affb08cb (patch) | |
tree | 66785f09491c3e9b744ba886b978efba6baf65c2 /net | |
parent | afdd614071aef652f5a3e2a06965de049dd8339b (diff) | |
download | blackbird-op-linux-66a0be47200fff30f8c482ea584052c6affb08cb.tar.gz blackbird-op-linux-66a0be47200fff30f8c482ea584052c6affb08cb.zip |
ipvs: Use list_empty() instead of open-coding the same functionality
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipvs/ip_vs_sched.c b/net/ipv4/ipvs/ip_vs_sched.c index b64767309855..a46ad9e35016 100644 --- a/net/ipv4/ipvs/ip_vs_sched.c +++ b/net/ipv4/ipvs/ip_vs_sched.c @@ -184,7 +184,7 @@ int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler) write_lock_bh(&__ip_vs_sched_lock); - if (scheduler->n_list.next != &scheduler->n_list) { + if (!list_empty(&scheduler->n_list)) { write_unlock_bh(&__ip_vs_sched_lock); ip_vs_use_count_dec(); IP_VS_ERR("register_ip_vs_scheduler(): [%s] scheduler " @@ -229,7 +229,7 @@ int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler) } write_lock_bh(&__ip_vs_sched_lock); - if (scheduler->n_list.next == &scheduler->n_list) { + if (list_empty(&scheduler->n_list)) { write_unlock_bh(&__ip_vs_sched_lock); IP_VS_ERR("unregister_ip_vs_scheduler(): [%s] scheduler " "is not in the list. failed\n", scheduler->name); |