aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_nat_snmp_basic.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-06-03 17:41:40 +0000
committerDavid S. Miller <davem@davemloft.net>2012-06-04 11:45:11 -0400
commite3192690a3c889767d1161b228374f4926d92af0 (patch)
treea2acbe06cc2efedb6002055f9d4ffd7f2ba6ec75 /net/ipv4/netfilter/nf_nat_snmp_basic.c
parentnet/ethernet: ks8851_mll mac address configuration support added (diff)
downloadlinux-dev-e3192690a3c889767d1161b228374f4926d92af0.tar.xz
linux-dev-e3192690a3c889767d1161b228374f4926d92af0.zip
net: Remove casts to same type
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force and __user. @@ type T; T *p; @@ - (T *)p + p Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/nf_nat_snmp_basic.c')
-rw-r--r--net/ipv4/netfilter/nf_nat_snmp_basic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 746edec8b86e..bac712293fd6 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -405,7 +405,7 @@ static unsigned char asn1_octets_decode(struct asn1_ctx *ctx,
ptr = *octets;
while (ctx->pointer < eoc) {
- if (!asn1_octet_decode(ctx, (unsigned char *)ptr++)) {
+ if (!asn1_octet_decode(ctx, ptr++)) {
kfree(*octets);
*octets = NULL;
return 0;
@@ -759,7 +759,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx,
}
break;
case SNMP_OBJECTID:
- if (!asn1_oid_decode(ctx, end, (unsigned long **)&lp, &len)) {
+ if (!asn1_oid_decode(ctx, end, &lp, &len)) {
kfree(id);
return 0;
}