xfrm: potential uninitialized variable num_xfrms
authorChangli Gao <xiaosuo@gmail.com>
Tue, 27 Apr 2010 21:20:22 +0000 (21:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Apr 2010 23:40:05 +0000 (16:40 -0700)
potential uninitialized variable num_xfrms

fix compiler warning: 'num_xfrms' may be used uninitialized in this function.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/xfrm/xfrm_policy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_policy.c

index 7430ac26ec491bb076a404f0f8d7687744e9fe83..31f4ba43b48fdcb77d617b28dca40c1dc5d6258b 100644 (file)
@@ -1732,7 +1732,7 @@ int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl,
        struct dst_entry *dst, *dst_orig = *dst_p, *route;
        u16 family = dst_orig->ops->family;
        u8 dir = policy_to_flow_dir(XFRM_POLICY_OUT);
-       int i, err, num_pols, num_xfrms, drop_pols = 0;
+       int i, err, num_pols, num_xfrms = 0, drop_pols = 0;
 
 restart:
        dst = NULL;