Module Name: src Committed By: christos Date: Mon Nov 9 17:52:59 UTC 2015
Modified Files: src/sys/dev: vnd.c Log Message: explain why the int cast works (suggested by kre) To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252 src/sys/dev/vnd.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/dev/vnd.c diff -u src/sys/dev/vnd.c:1.251 src/sys/dev/vnd.c:1.252 --- src/sys/dev/vnd.c:1.251 Mon Nov 9 12:41:24 2015 +++ src/sys/dev/vnd.c Mon Nov 9 12:52:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $ */ +/* $NetBSD: vnd.c,v 1.252 2015/11/09 17:52:59 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.251 2015/11/09 17:41:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.252 2015/11/09 17:52:59 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_vnd.h" @@ -1068,6 +1068,7 @@ vndioctl_get(struct lwp *l, void *data, KASSERT(l); + /* the first member is always int vnd_unit in all the versions */ if (*(int *)data >= vnd_cd.cd_ndevs) return ENXIO;