diff options
author | Joe Perches <joe@perches.com> | 2008-04-12 22:04:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-12 22:04:38 -0400 |
commit | b9f3124f08fffe2ad706fd164f6702fdca409a91 (patch) | |
tree | c58bf735e48e746fcedaba9d9ef70732a8781627 /net/unix | |
parent | 1a4187963e5a706e78bbfa2d5b2e9101a63f1f7c (diff) |
[AF_UNIX]: Use SEQ_START_TOKEN
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 50bbf6bb1a22..2851d0d15048 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -2037,7 +2037,7 @@ static void *unix_seq_start(struct seq_file *seq, loff_t *pos) | |||
2037 | __acquires(unix_table_lock) | 2037 | __acquires(unix_table_lock) |
2038 | { | 2038 | { |
2039 | spin_lock(&unix_table_lock); | 2039 | spin_lock(&unix_table_lock); |
2040 | return *pos ? unix_seq_idx(seq, *pos - 1) : ((void *) 1); | 2040 | return *pos ? unix_seq_idx(seq, *pos - 1) : SEQ_START_TOKEN; |
2041 | } | 2041 | } |
2042 | 2042 | ||
2043 | static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 2043 | static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
@@ -2046,7 +2046,7 @@ static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
2046 | struct sock *sk = v; | 2046 | struct sock *sk = v; |
2047 | ++*pos; | 2047 | ++*pos; |
2048 | 2048 | ||
2049 | if (v == (void *)1) | 2049 | if (v == SEQ_START_TOKEN) |
2050 | sk = first_unix_socket(&iter->i); | 2050 | sk = first_unix_socket(&iter->i); |
2051 | else | 2051 | else |
2052 | sk = next_unix_socket(&iter->i, sk); | 2052 | sk = next_unix_socket(&iter->i, sk); |
@@ -2064,7 +2064,7 @@ static void unix_seq_stop(struct seq_file *seq, void *v) | |||
2064 | static int unix_seq_show(struct seq_file *seq, void *v) | 2064 | static int unix_seq_show(struct seq_file *seq, void *v) |
2065 | { | 2065 | { |
2066 | 2066 | ||
2067 | if (v == (void *)1) | 2067 | if (v == SEQ_START_TOKEN) |
2068 | seq_puts(seq, "Num RefCount Protocol Flags Type St " | 2068 | seq_puts(seq, "Num RefCount Protocol Flags Type St " |
2069 | "Inode Path\n"); | 2069 | "Inode Path\n"); |
2070 | else { | 2070 | else { |