diff options
author | David S. Miller <davem@davemloft.net> | 2006-03-21 01:36:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:36:21 -0500 |
commit | edb2c34fb2683ff21c8a6bcc3e41c07a53601761 (patch) | |
tree | aae0b87f2377f4134ee38017f8c9041d1247e730 /net | |
parent | fb9504964d32f69e4381dc8895eeb8e81a32af72 (diff) |
[NETFILTER]: Fix warnings in ip_nat_snmp_basic.c
net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'asn1_header_decode':
net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'len' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'def' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'snmp_translate':
net/ipv4/netfilter/ip_nat_snmp_basic.c:672: warning: 'l' may be used uninitialized in this function
net/ipv4/netfilter/ip_nat_snmp_basic.c:668: warning: 'type' may be used uninitialized in this function
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_nat_snmp_basic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c index 4f95d477805..f029da2a60e 100644 --- a/net/ipv4/netfilter/ip_nat_snmp_basic.c +++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c | |||
@@ -250,6 +250,7 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx, | |||
250 | if (!asn1_id_decode(ctx, cls, con, tag)) | 250 | if (!asn1_id_decode(ctx, cls, con, tag)) |
251 | return 0; | 251 | return 0; |
252 | 252 | ||
253 | def = len = 0; | ||
253 | if (!asn1_length_decode(ctx, &def, &len)) | 254 | if (!asn1_length_decode(ctx, &def, &len)) |
254 | return 0; | 255 | return 0; |
255 | 256 | ||
@@ -669,7 +670,7 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
669 | unsigned char *eoc, *end, *p; | 670 | unsigned char *eoc, *end, *p; |
670 | unsigned long *lp, *id; | 671 | unsigned long *lp, *id; |
671 | unsigned long ul; | 672 | unsigned long ul; |
672 | long l; | 673 | long l; |
673 | 674 | ||
674 | *obj = NULL; | 675 | *obj = NULL; |
675 | id = NULL; | 676 | id = NULL; |
@@ -699,11 +700,13 @@ static unsigned char snmp_object_decode(struct asn1_ctx *ctx, | |||
699 | return 0; | 700 | return 0; |
700 | } | 701 | } |
701 | 702 | ||
703 | type = 0; | ||
702 | if (!snmp_tag_cls2syntax(tag, cls, &type)) { | 704 | if (!snmp_tag_cls2syntax(tag, cls, &type)) { |
703 | kfree(id); | 705 | kfree(id); |
704 | return 0; | 706 | return 0; |
705 | } | 707 | } |
706 | 708 | ||
709 | l = 0; | ||
707 | switch (type) { | 710 | switch (type) { |
708 | case SNMP_INTEGER: | 711 | case SNMP_INTEGER: |
709 | len = sizeof(long); | 712 | len = sizeof(long); |