Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Make VIMPL_TO_VNODE and VNODE_TO_VIMPL type-safe.
details: https://anonhg.NetBSD.org/src/rev/2a8e3d77942c
branches: trunk
changeset: 822386:2a8e3d77942c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Mar 18 05:55:12 2017 +0000
description:
Make VIMPL_TO_VNODE and VNODE_TO_VIMPL type-safe.
diffstat:
sys/sys/vnode_impl.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r b79a8d34e596 -r 2a8e3d77942c sys/sys/vnode_impl.h
--- a/sys/sys/vnode_impl.h Sat Mar 18 05:49:56 2017 +0000
+++ b/sys/sys/vnode_impl.h Sat Mar 18 05:55:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_impl.h,v 1.11 2017/01/11 09:08:59 hannken Exp $ */
+/* $NetBSD: vnode_impl.h,v 1.12 2017/03/18 05:55:12 riastradh Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -81,8 +81,8 @@
};
typedef struct vnode_impl vnode_impl_t;
-#define VIMPL_TO_VNODE(vip) ((vnode_t *)(vip))
-#define VNODE_TO_VIMPL(vp) ((vnode_impl_t *)(vp))
+#define VIMPL_TO_VNODE(vip) (&(vip)->vi_vnode)
+#define VNODE_TO_VIMPL(vp) container_of((vp), struct vnode_impl, vi_vnode)
/*
* Vnode manipulation functions.
Home |
Main Index |
Thread Index |
Old Index