Re: [PATCH] fib_trie: coding style: Use pointer after check

2015-06-08 Thread David Miller
From: Firo Yang fir...@gmail.com Date: Mon, 8 Jun 2015 11:54:51 +0800 As Alexander Duyck pointed out that: struct tnode { ... struct key_vector kv[1]; } The kv[1] member of struct tnode is an arry that refernced by a null pointer will not crash the system, like this:

[PATCH] fib_trie: coding style: Use pointer after check

2015-06-07 Thread Firo Yang
As Alexander Duyck pointed out that: struct tnode { ... struct key_vector kv[1]; } The kv[1] member of struct tnode is an arry that refernced by a null pointer will not crash the system, like this: struct tnode *p = NULL; struct key_vector *kv = p-kv; As such p-kv doesn't actually