netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: xfrm6: silence sparse warning
@ 2014-01-08  2:56 Ying Xue
  2014-01-08  3:43 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Ying Xue @ 2014-01-08  2:56 UTC (permalink / raw)
  To: steffen.klassert, davem; +Cc: dborkman, netdev

Fix below sparse warning:

net/ipv6/xfrm6_state.c:66:26: error: cannot size expression

Signed-off-by: Ying Xue <ying.xue@windriver.com>
---
 net/ipv6/xfrm6_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index 3fc9701..0c10dff 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -63,7 +63,7 @@ __xfrm6_sort(void **dst, void **src, int n, int (*cmp)(void *p), int maxclass)
 	int class[XFRM_MAX_DEPTH];
 	int count[maxclass];
 
-	memset(count, 0, sizeof(count));
+	memset(count, 0, sizeof(int) * maxclass);
 
 	for (i = 0; i < n; i++) {
 		int c;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-10  5:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08  2:56 [PATCH net-next] net: xfrm6: silence sparse warning Ying Xue
2014-01-08  3:43 ` David Miller
2014-01-08  5:55   ` Ying Xue
2014-01-08  5:56     ` David Miller
2014-01-09 23:04       ` Stephen Hemminger
2014-01-10  2:53         ` Ben Hutchings
2014-01-10  5:30           ` Stephen Hemminger
2014-01-08 20:46   ` Ben Hutchings

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).