[KJ] [PATCH 1/1] net/netfilter/x_tables.c unnecessary casts

2 views
Skip to first unread message

liran tal

unread,
Sep 11, 2007, 5:55:13 AM9/11/07
to kernel-janitors
The patch removes an unnecessary cast in accordance to the rest of
the code. Kernel version is 2.6.22 with latest patches.


--- x_tables.c 2007-09-11 11:22:11.000000000 +0300
+++ x_tables.c.orig 2007-09-11 11:21: 44.000000000 +0300
@@ -691,7 +691,7 @@ static struct list_head *type2list(u_int

static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct proc_dir_entry *pde = seq->private;
+ struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
u_int16_t af = (unsigned long)pde->data & 0xffff;
u_int16_t type = (unsigned long)pde->data >> 16;
struct list_head *list;


Signed-off-by: Liran Tal <lira...@gmail.com<lists-...@programmierforen.de>
>
_______________________________________________
REMINDER: this mailing list moved to vger.kernel.org and current one will be discontinued soon.
To resubscribe, send email to majo...@vger.kernel.org with
&quot;subscribe kernel-janitors&quot; in message body and follow instructions.

Kernel-janitors mailing list
Kernel-...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

Bernd Petrovitsch

unread,
Sep 11, 2007, 6:18:05 AM9/11/07
to liran tal, kernel-janitors
On Tue, 2007-09-11 at 12:55 +0300, liran tal wrote:
> The patch removes an unnecessary cast in accordance to the rest of
^^^^^^^

> the code. Kernel version is 2.6.22 with latest patches.
>
>
> --- x_tables.c 2007-09-11 11:22:11.000000000 +0300
> +++ x_tables.c.orig 2007-09-11 11:21: 44.000000000 +0300
> @@ -691,7 +691,7 @@ static struct list_head *type2list(u_int
>
> static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
> {
> - struct proc_dir_entry *pde = seq->private;
> + struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;

The patch looks reversed.

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services

liran tal

unread,
Sep 11, 2007, 7:11:13 AM9/11/07
to Bernd Petrovitsch, kernel-janitors
Thank you.
Here it is again.

--- x_tables.c.orig 2007-09-11 11:21:44.000000000 +0300
+++ x_tables.c 2007-09-11 11:22:11.000000000 +0300


@@ -691,7 +691,7 @@ static struct list_head *type2list(u_int

static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
{

- struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
+ struct proc_dir_entry *pde = seq->private;


u_int16_t af = (unsigned long)pde->data & 0xffff;
u_int16_t type = (unsigned long)pde->data >> 16;
struct list_head *list;

Reply all
Reply to author
Forward
0 new messages