Re: [PATCH] net/netfilter/x_tables.c: use __seq_open_private()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Would you like that change made and re-submitted? It's the work of
moments to do it.

I was only concentrating on not changing the logic so I didn't check on
whether and existing initialisation was made redundant.

On 23/09/14 15:02, Pablo Neira Ayuso wrote:
On Fri, Sep 19, 2014 at 11:27:51AM +0100, Rob Jones wrote:
Reduce boilerplate code by using __seq_open_private() instead of seq_open()
in xt_match_open() and xt_target_open().

Signed-off-by: Rob Jones <rob.jones@xxxxxxxxxxxxxxx>
---

This patch uses an existing variant of seq_open() to reduce the kernel code
size.

Less code to maintain, good.

The only significant variation from the pre-existing code is the fact that
__seq_open_private() calls kzalloc() rather than kmalloc(), which could
conceivably have an impact on timing.

I think you can skip

         trav->class = MTTG_TRAV_INIT;

too, now that trav is set to zero.




--
Rob Jones
Codethink Ltd
mailto:rob.jones@xxxxxxxxxxxxxxx
tel:+44 161 236 5575
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux