Received: with ECARTIS (v1.0.0; list netdev); Thu, 18 Sep 2003 22:42:34 -0700 (PDT) Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by oss.sgi.com (8.12.10/8.12.10) with SMTP id h8J5gQFx030810 for ; Thu, 18 Sep 2003 22:42:27 -0700 Received: from compsoc.umu.man.ac.uk ([130.88.22.5] helo=mrtall.compsoc.man.ac.uk ident=exim) by probity.mcc.ac.uk with esmtp (Exim 4.20) id 1A06H9-0004Zs-3V for netdev@oss.sgi.com; Thu, 18 Sep 2003 22:25:19 +0100 Received: from moz by mrtall.compsoc.man.ac.uk with local (Exim 3.33 #1) id 1A06H8-000Mc8-00 for netdev@oss.sgi.com; Thu, 18 Sep 2003 22:25:18 +0100 Date: Thu, 18 Sep 2003 22:25:18 +0100 From: John Levon To: netdev@oss.sgi.com Subject: [PATCH] SEQ_START_TOKEN for af_netlink.c Message-ID: <20030918212518.GA86845@compsoc.man.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-Url: http://www.movementarian.org/ X-Record: King of Woolworths - L'Illustration Musicale X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *1A06H9-0004Zs-3V*TYJwbTnW9lw* X-archive-position: 51 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: levon@movementarian.org Precedence: bulk X-list: netdev Content-Length: 1149 Lines: 36 Seems this got missed in the sweep. regards john diff -Naurp -X dontdiff linux-cvs/net/netlink/af_netlink.c linux-fixes/net/netlink/af_netlink.c --- linux-cvs/net/netlink/af_netlink.c 2003-09-05 18:48:00.000000000 +0100 +++ linux-fixes/net/netlink/af_netlink.c 2003-09-18 22:45:19.000000000 +0100 @@ -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");