Module Name:    src
Committed By:   dholland
Date:           Sun Aug 14 23:13:44 UTC 2011

Modified Files:
        src/usr.sbin/iopctl: iopctl.c

Log Message:
Add compile-time assertion to make sure the previous doesn't go off the
rails sometime in the future.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/iopctl/iopctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/iopctl/iopctl.c
diff -u src/usr.sbin/iopctl/iopctl.c:1.20 src/usr.sbin/iopctl/iopctl.c:1.21
--- src/usr.sbin/iopctl/iopctl.c:1.20	Sun Aug 14 17:54:55 2011
+++ src/usr.sbin/iopctl/iopctl.c	Sun Aug 14 23:13:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iopctl.c,v 1.20 2011/08/14 17:54:55 christos Exp $	*/
+/*	$NetBSD: iopctl.c,v 1.21 2011/08/14 23:13:43 dholland Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #ifndef lint
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: iopctl.c,v 1.20 2011/08/14 17:54:55 christos Exp $");
+__RCSID("$NetBSD: iopctl.c,v 1.21 2011/08/14 23:13:43 dholland Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -353,6 +353,7 @@
 	i2ostrvis(p.di.revlevel, sizeof(p.di.revlevel), ident, sizeof(ident));
 	show("module revision", "%s", ident);
 	show("serial # format", "%d", p.di.snformat);
+	__CTASSERT(sizeof(serial) == sizeof(p.di.serialnumber));
 	memcpy(serial, &p.di.serialnumber, sizeof(serial));
 	show("serial #", "%08x%08x%08x", serial[0], serial[1], serial[2]);
 }

Reply via email to