Module Name: src Committed By: dholland Date: Fri Aug 30 07:35:44 UTC 2013
Modified Files: src/sys/nfs: nfs_export.c Log Message: Use __CTASSERT instead of handrolled version. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/nfs/nfs_export.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/nfs/nfs_export.c diff -u src/sys/nfs/nfs_export.c:1.53 src/sys/nfs/nfs_export.c:1.54 --- src/sys/nfs/nfs_export.c:1.53 Fri Aug 30 07:30:50 2013 +++ src/sys/nfs/nfs_export.c Fri Aug 30 07:35:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_export.c,v 1.53 2013/08/30 07:30:50 dholland Exp $ */ +/* $NetBSD: nfs_export.c,v 1.54 2013/08/30 07:35:44 dholland Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2008 The NetBSD Foundation, Inc. @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.53 2013/08/30 07:30:50 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.54 2013/08/30 07:35:44 dholland Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -445,9 +445,11 @@ nfs_export_update_30(struct mount *mp, c * value that used to be in MNT_DELEXPORT. */ mel.mel_nexports = 0; } else { - /* The following assumes export_args has not changed since - * export_args30 - typedef checks sizes. */ - typedef char x[sizeof args->eargs == sizeof *mel.mel_exports ? 1 : -1]; + /* + * The following code assumes export_args has not + * changed since export_args30, so check that. + */ + __CTASSERT(sizeof(args->eargs) == sizeof(*mel.mel_exports)); mel.mel_nexports = 1; mel.mel_exports = (void *)&args->eargs;