Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev explain why the int cast works (suggested by kre)
details: https://anonhg.NetBSD.org/src/rev/c33d8a3e6d94
branches: trunk
changeset: 341517:c33d8a3e6d94
user: christos <christos%NetBSD.org@localhost>
date: Mon Nov 09 17:52:59 2015 +0000
description:
explain why the int cast works (suggested by kre)
diffstat:
sys/dev/vnd.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 676761cba19c -r c33d8a3e6d94 sys/dev/vnd.c
--- a/sys/dev/vnd.c Mon Nov 09 17:41:24 2015 +0000
+++ b/sys/dev/vnd.c Mon Nov 09 17:52:59 2015 +0000
@@ -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 @@
KASSERT(l);
+ /* the first member is always int vnd_unit in all the versions */
if (*(int *)data >= vnd_cd.cd_ndevs)
return ENXIO;
Home |
Main Index |
Thread Index |
Old Index