]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Check type of x and y in seq_(before|after)
authorSven Eckelmann <sven@narfation.org>
Thu, 19 May 2011 19:43:08 +0000 (21:43 +0200)
committerSven Eckelmann <sven@narfation.org>
Mon, 30 May 2011 05:39:35 +0000 (07:39 +0200)
commitdf81650ee42ac16d8bd62c0f8f8c3338d3efdf84
tree6eb43658148c45033ba4f57f7ccb02add30262d9
parentceef5b1d6ba9f3243697aa50b8dd4cd47e99a61a
batman-adv: Check type of x and y in seq_(before|after)

seq_before and seq_after depend on the fact that both sequence numbers
have the same type and thus the same bitwidth. We can ensure that by
compile time checking using a compare between the pointer to the
temporary buffers which were created using the typeof of both
parameters. For example gcc would create a warning like
"warning: comparison of distinct pointer types lacks a cast".

Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/main.h