diff options
author | Firo Yang <firogm@gmail.com> | 2015-06-08 11:54:51 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-07 23:45:40 -0700 |
commit | f38b24c90528c888915ef6e3bc320bdb30b14cf2 (patch) | |
tree | fb9220fc44e94ead33fa8165c5bc2cf1301e8618 /mm/memory.c | |
parent | cbab1510afbb140f7a51d996eafc525ac316c667 (diff) | |
download | talos-obmc-linux-f38b24c90528c888915ef6e3bc320bdb30b14cf2.tar.gz talos-obmc-linux-f38b24c90528c888915ef6e3bc320bdb30b14cf2.zip |
fib_trie: coding style: Use pointer after check
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 dereference anything, it is simply a
means for getting the offset to the array from the pointer p.
This patch make the code more regular to avoid making people feel
odd when they look at the code.
Signed-off-by: Firo Yang <firogm@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/memory.c')
0 files changed, 0 insertions, 0 deletions