]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[AF_UNIX]: Use SEQ_START_TOKEN
authorJoe Perches <joe@perches.com>
Sun, 13 Apr 2008 02:04:38 +0000 (19:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Apr 2008 02:04:38 +0000 (19:04 -0700)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/unix/af_unix.c

index 50bbf6bb1a224f8ecb3114990fa400c137efad82..2851d0d15048e8d958668f2eaa9129220f274010 100644 (file)
@@ -2037,7 +2037,7 @@ static void *unix_seq_start(struct seq_file *seq, loff_t *pos)
        __acquires(unix_table_lock)
 {
        spin_lock(&unix_table_lock);
-       return *pos ? unix_seq_idx(seq, *pos - 1) : ((void *) 1);
+       return *pos ? unix_seq_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 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)
        struct sock *sk = v;
        ++*pos;
 
-       if (v == (void *)1)
+       if (v == SEQ_START_TOKEN)
                sk = first_unix_socket(&iter->i);
        else
                sk = next_unix_socket(&iter->i, sk);
@@ -2064,7 +2064,7 @@ static void unix_seq_stop(struct seq_file *seq, void *v)
 static int unix_seq_show(struct seq_file *seq, void *v)
 {
 
-       if (v == (void *)1)
+       if (v == SEQ_START_TOKEN)
                seq_puts(seq, "Num       RefCount Protocol Flags    Type St "
                         "Inode Path\n");
        else {