Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci add CTASSERT and KNF.



details:   https://anonhg.NetBSD.org/src/rev/cf641f31797c
branches:  trunk
changeset: 341158:cf641f31797c
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Oct 22 07:00:05 2015 +0000

description:
add CTASSERT and KNF.

diffstat:

 sys/dev/pci/if_wm.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 8d68c2b3c87b -r cf641f31797c sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Oct 22 06:01:41 2015 +0000
+++ b/sys/dev/pci/if_wm.c       Thu Oct 22 07:00:05 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.372 2015/10/22 06:01:41 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.373 2015/10/22 07:00:05 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.372 2015/10/22 06:01:41 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.373 2015/10/22 07:00:05 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -4081,6 +4081,7 @@
 static void
 wm_rss_getkey(uint8_t *key)
 {
+
        memcpy(key, wm_rss_key, sizeof(wm_rss_key));
 }
 
@@ -4095,6 +4096,8 @@
        uint32_t mrqc, reta_reg, rss_key[RSSRK_NUM_REGS];
        int i;
 
+       CTASSERT(sizeof(rss_key) == sizeof(wm_rss_key));
+
        for (i = 0; i < RETA_NUM_ENTRIES; i++) {
                int qid, reta_ent;
 



Home | Main Index | Thread Index | Old Index