]> git.baikalelectronics.ru Git - kernel.git/commit
net: sctp: Use pointers (not array indexes) to access sctp_cmd_seq_t.cmds[].
authorDavid Laight <David.Laight@ACULAB.COM>
Fri, 4 Jul 2014 14:35:57 +0000 (14:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 21:39:00 +0000 (14:39 -0700)
commiteab5510ea8503820bf95df8852d69d14b822bef7
tree8f30dc91827100ae42c0a90edc9cb00bb0fa56b4
parente45f5aa54eb88fa6e7dc7ab6597977e3b48d55dc
net: sctp: Use pointers (not array indexes) to access sctp_cmd_seq_t.cmds[].

Using pointers into sctp_cmd_seq_t.cmds[] lets the compiler generate much
better code.
Use the last entry first to optimise the overflow check.

Signed-off-by: David Laight <david.laight@aculab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/command.h