netfilter: Use pr_cont where appropriate

Logging output was changed when simple printks without KERN_CONT
are now emitted on a new line and KERN_CONT is required to continue
lines so use pr_cont.

Miscellanea:

o realign arguments
o use print_hex_dump instead of a local variant

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Joe Perches
2017-02-28 14:09:24 -08:00
committed by Pablo Neira Ayuso
parent 3206caded8
commit 13fa745da2
2 changed files with 19 additions and 30 deletions

View File

@@ -998,18 +998,6 @@ err_id_free:
*
*****************************************************************************/
static void hex_dump(const unsigned char *buf, size_t len)
{
size_t i;
for (i = 0; i < len; i++) {
if (i && !(i % 16))
printk("\n");
printk("%02x ", *(buf + i));
}
printk("\n");
}
/*
* Parse and mangle SNMP message according to mapping.
* (And this is the fucking 'basic' method).
@@ -1026,7 +1014,8 @@ static int snmp_parse_mangle(unsigned char *msg,
struct snmp_object *obj;
if (debug > 1)
hex_dump(msg, len);
print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_NONE, 16, 1,
msg, len, 0);
asn1_open(&ctx, msg, len);