From aaad5f53ac3c463f79281c6f6e48a1475a987250 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 30 Sep 2009 00:09:07 +0200 Subject: [PATCH] pknock: remove pointless sizeof(char) sizeof(char) is defined to be 1, anyway. --- extensions/xt_pknock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/xt_pknock.c b/extensions/xt_pknock.c index 0b0bcf1..60953ba 100644 --- a/extensions/xt_pknock.c +++ b/extensions/xt_pknock.c @@ -720,14 +720,14 @@ has_secret(unsigned char *secret, int secret_len, uint32_t ipsrc, if (payload_len != hexa_size + 1) return 0; - hexresult = kmalloc(sizeof(char) * hexa_size, GFP_ATOMIC); + hexresult = kmalloc(hexa_size, GFP_ATOMIC); if (hexresult == NULL) { printk(KERN_ERR PKNOCK "kmalloc() error in has_secret().\n"); return 0; } memset(result, 0, 64); - memset(hexresult, 0, (sizeof(char) * hexa_size)); + memset(hexresult, 0, hexa_size); epoch_min = get_epoch_minute();