Skip to contentSkip to conversation

SEQ_START_TOKEN for af_netlink.c

PATCH Applied John Levon 2 participants 2 messages Sep 18, 2003 – Sep 20, 2003

Subsystems (2)
lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 SEQ_START_TOKEN for af_netlink.c

Seems this got missed in the sweep.

regards
john

net/netlink/af_netlink.c +3 -3
diff -Naurp -X dontdiff linux-cvs/net/netlink/af_netlink.c linux-fixes/net/netlink/af_netlink.c
@@ -988,7 +988,7 @@ static struct sock *netlink_seq_socket_i
 static void *netlink_seq_start(struct seq_file *seq, loff_t *pos)
 {
 	read_lock(&nl_table_lock);
-	return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : (void *) 1;
+	return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : SEQ_START_TOKEN;
 }
 
 static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos)
@@ -997,7 +997,7 @@ static void *netlink_seq_next(struct seq
 
 	++*pos;
 
-	if (v == (void *) 1) 
+	if (v == SEQ_START_TOKEN)
 		return netlink_seq_socket_idx(seq, 0);
 		
 	s = sk_next(v);
@@ -1023,7 +1023,7 @@ static void netlink_seq_stop(struct seq_
 
 static int netlink_seq_show(struct seq_file *seq, void *v)
 {
-	if (v == (void *)1) 
+	if (v == SEQ_START_TOKEN)
 		seq_puts(seq,
 			 "sk       Eth Pid    Groups   "
 			 "Rmem     Wmem     Dump     Locks\n");