]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/ipv6/exthdrs.c
net: Remove casts to same type
[mirror_ubuntu-zesty-kernel.git] / net / ipv6 / exthdrs.c
index 6447dc49429fc13832a8fda9afab5a1ee0b6050e..fa3d9c3280927934bd7b082077674c3c31d4ad4c 100644 (file)
@@ -791,14 +791,14 @@ static int ipv6_renew_option(void *ohdr,
                if (ohdr) {
                        memcpy(*p, ohdr, ipv6_optlen((struct ipv6_opt_hdr *)ohdr));
                        *hdr = (struct ipv6_opt_hdr *)*p;
-                       *p += CMSG_ALIGN(ipv6_optlen(*(struct ipv6_opt_hdr **)hdr));
+                       *p += CMSG_ALIGN(ipv6_optlen(*hdr));
                }
        } else {
                if (newopt) {
                        if (copy_from_user(*p, newopt, newoptlen))
                                return -EFAULT;
                        *hdr = (struct ipv6_opt_hdr *)*p;
-                       if (ipv6_optlen(*(struct ipv6_opt_hdr **)hdr) > newoptlen)
+                       if (ipv6_optlen(*hdr) > newoptlen)
                                return -EINVAL;
                        *p += CMSG_ALIGN(newoptlen);
                }