From aa2bd30488cd839e8bca6320c1e0a00303d11b68 Mon Sep 17 00:00:00 2001 From: Matti Vaittinen Date: Tue, 15 Nov 2011 00:58:59 +0000 Subject: [PATCH] --- yaml --- r: 277544 b: refs/heads/master c: 229a66e3bec97563aa92e25dfe0bc60b0d468619 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv6/ip6_fib.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e2ee0b71fe7c..252edafdd2cf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ad79eefc42d56cb851a2b28a86e481cf1161005e +refs/heads/master: 229a66e3bec97563aa92e25dfe0bc60b0d468619 diff --git a/trunk/net/ipv6/ip6_fib.c b/trunk/net/ipv6/ip6_fib.c index 9239d559b41b..e8a0fcf8850a 100644 --- a/trunk/net/ipv6/ip6_fib.c +++ b/trunk/net/ipv6/ip6_fib.c @@ -635,10 +635,9 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt, { struct rt6_info *iter = NULL; struct rt6_info **ins; - int replace = (NULL != info && - NULL != info->nlh && + int replace = (NULL != info->nlh && (info->nlh->nlmsg_flags&NLM_F_REPLACE)); - int add = ((NULL == info || NULL == info->nlh) || + int add = (NULL == info->nlh || (info->nlh->nlmsg_flags&NLM_F_CREATE)); int found = 0; @@ -755,7 +754,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info) int err = -ENOMEM; int allow_create = 1; int replace_required = 0; - if (NULL != info && NULL != info->nlh) { + if (NULL != info->nlh) { if (!(info->nlh->nlmsg_flags&NLM_F_CREATE)) allow_create = 0; if ((info->nlh->nlmsg_flags&NLM_F_REPLACE))