Skip to content

Commit

Permalink
inetpeer_gc_worker: trivial cleanup
Browse files Browse the repository at this point in the history
Do not initialize list twice.
list_replace_init() already takes care of initializing list.
We don't need to initialize it with LIST_HEAD() beforehand.

Signed-off-by: xiao jin <jin.xiao@intel.com>
Reviewed-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
xiao jin authored and David S. Miller committed Apr 26, 2014
1 parent 1818ce4 commit 851bdd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/inetpeer.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min
static void inetpeer_gc_worker(struct work_struct *work)
{
struct inet_peer *p, *n, *c;
LIST_HEAD(list);
struct list_head list;

spin_lock_bh(&gc_lock);
list_replace_init(&gc_list, &list);
Expand Down

0 comments on commit 851bdd1

Please sign in to comment.