Skip to content

Commit

Permalink
[X25]: use LIST_HEAD instead of LIST_HEAD_INIT
Browse files Browse the repository at this point in the history
single list_head variable initialized with LIST_HEAD_INIT could almost
always can be replaced with LIST_HEAD declaration, this shrinks the code
and looks better.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis Cheng authored and David S. Miller committed Jan 28, 2008
1 parent 14d0e7b commit 0e3cf7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/x25/x25_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/init.h>
#include <net/x25.h>

struct list_head x25_forward_list = LIST_HEAD_INIT(x25_forward_list);
LIST_HEAD(x25_forward_list);
DEFINE_RWLOCK(x25_forward_list_lock);

int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from,
Expand Down
2 changes: 1 addition & 1 deletion net/x25/x25_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <linux/init.h>
#include <net/x25.h>

static struct list_head x25_neigh_list = LIST_HEAD_INIT(x25_neigh_list);
static LIST_HEAD(x25_neigh_list);
static DEFINE_RWLOCK(x25_neigh_list_lock);

static void x25_t20timer_expiry(unsigned long);
Expand Down
2 changes: 1 addition & 1 deletion net/x25/x25_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/init.h>
#include <net/x25.h>

struct list_head x25_route_list = LIST_HEAD_INIT(x25_route_list);
LIST_HEAD(x25_route_list);
DEFINE_RWLOCK(x25_route_list_lock);

/*
Expand Down

0 comments on commit 0e3cf7e

Please sign in to comment.