mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>. Signed-off-by: Patrick McHardy <[email protected]>
This commit is contained in:
parent
d70a011dbb
commit
cf377eb4ae
2 changed files with 9 additions and 9 deletions
|
|
@ -411,12 +411,12 @@ ipt_log_packet(u_int8_t pf,
|
|||
skb->mac_header != skb->network_header) {
|
||||
int i;
|
||||
const unsigned char *p = skb_mac_header(skb);
|
||||
for (i = 0; i < skb->dev->hard_header_len; i++,p++)
|
||||
printk("%02x%c", *p,
|
||||
i==skb->dev->hard_header_len - 1
|
||||
? ' ':':');
|
||||
} else
|
||||
printk(" ");
|
||||
|
||||
printk("%02x", *p++);
|
||||
for (i = 1; i < skb->dev->hard_header_len; i++, p++)
|
||||
printk(":%02x", *p);
|
||||
}
|
||||
printk(" ");
|
||||
}
|
||||
|
||||
dump_packet(loginfo, skb, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue