diff options
author | Patrick McHardy <kaber@trash.net> | 2010-06-28 14:12:41 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-06-28 14:12:41 +0200 |
commit | cf377eb4aeded926375d4d0fe0b66ba95f0521e1 (patch) | |
tree | 010628b36c81d050f4189fb8e94f0cdec60dc3c0 /net/ipv6 | |
parent | d70a011dbbaa6335a19deb63ec3eb613f48faafd (diff) | |
download | kernel_samsung_aries-cf377eb4aeded926375d4d0fe0b66ba95f0521e1.zip kernel_samsung_aries-cf377eb4aeded926375d4d0fe0b66ba95f0521e1.tar.gz kernel_samsung_aries-cf377eb4aeded926375d4d0fe0b66ba95f0521e1.tar.bz2 |
netfilter: ipt_LOG/ip6t_LOG: remove comparison within loop
Remove the comparison within the loop to print the macheader by prepending
the colon to all but the first printk.
Based on suggestion by Jan Engelhardt <jengelh@medozas.de>.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index af4ee11..4c7ddac 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c @@ -414,9 +414,9 @@ ip6t_log_packet(u_int8_t pf, p = NULL; if (p != NULL) { - for (i = 0; i < len; i++) - printk("%02x%s", p[i], - i == len - 1 ? "" : ":"); + printk("%02x", *p++); + for (i = 1; i < len; i++) + printk(":%02x", p[i]); } printk(" "); |