mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-14 08:34:56 +02:00
pknock: remove pointless sizeof(char)
sizeof(char) is defined to be 1, anyway.
This commit is contained in:
@@ -720,14 +720,14 @@ has_secret(unsigned char *secret, int secret_len, uint32_t ipsrc,
|
|||||||
if (payload_len != hexa_size + 1)
|
if (payload_len != hexa_size + 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
hexresult = kmalloc(sizeof(char) * hexa_size, GFP_ATOMIC);
|
hexresult = kmalloc(hexa_size, GFP_ATOMIC);
|
||||||
if (hexresult == NULL) {
|
if (hexresult == NULL) {
|
||||||
printk(KERN_ERR PKNOCK "kmalloc() error in has_secret().\n");
|
printk(KERN_ERR PKNOCK "kmalloc() error in has_secret().\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(result, 0, 64);
|
memset(result, 0, 64);
|
||||||
memset(hexresult, 0, (sizeof(char) * hexa_size));
|
memset(hexresult, 0, hexa_size);
|
||||||
|
|
||||||
epoch_min = get_epoch_minute();
|
epoch_min = get_epoch_minute();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user