]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
pknock: remove pointless sizeof(char)
authorJan Engelhardt <jengelh@medozas.de>
Tue, 29 Sep 2009 22:09:07 +0000 (00:09 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 29 Sep 2009 22:09:07 +0000 (00:09 +0200)
sizeof(char) is defined to be 1, anyway.

extensions/xt_pknock.c

index 0b0bcf1547b11cf7621f4223396229bb9a687318..60953ba2a5db182c74c78a117eee96de5083c7ca 100644 (file)
@@ -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();