From: David Miller <davem@davemloft.net>
To: shemminger@vyatta.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] fib_trie: handle empty tree
Date: Mon, 11 Feb 2008 21:14:07 -0800 (PST) [thread overview]
Message-ID: <20080211.211407.08993863.davem@davemloft.net> (raw)
In-Reply-To: <20080211171250.60ad7bc5@extreme>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 11 Feb 2008 17:12:50 -0800
> To: David S. Miller <davem@davemloft.net>
When a user's name has "special" characters such as a "." as mine
does, it must be surrounded by double-quotes or else it is a syntax
error by SMTP rules. For this reason your patch postings were
rejected by vger.kernel.org
> This fixes possible problems when trie_firstleaf() returns NULL
> to trie_leafindex().
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied, thanks Stephen.
> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
> index f5fba3f..2d89527 100644
> --- a/net/ipv4/fib_trie.c
> +++ b/net/ipv4/fib_trie.c
> @@ -1762,11 +1762,9 @@ static struct leaf *trie_leafindex(struct trie *t, int index)
> {
> struct leaf *l = trie_firstleaf(t);
>
> - while (index-- > 0) {
> + while (l && index-- > 0)
> l = trie_nextleaf(l);
> - if (!l)
> - break;
> - }
> +
> return l;
> }
>
> --
> 1.5.3.8
>
next parent reply other threads:[~2008-02-12 5:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080211171250.60ad7bc5@extreme>
2008-02-12 5:14 ` David Miller [this message]
[not found] ` <20080211171659.28d96844@extreme>
2008-02-12 5:14 ` [PATCH 2/2] fib_trie: /proc/net/route performance improvement David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080211.211407.08993863.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).