Module Name: src
Committed By: joerg
Date: Wed Apr 18 13:31:10 UTC 2012
Modified Files:
src/sys/ufs/chfs: chfs_inode.h chfs_vnops.c
Log Message:
Don't depend on implicit enum casts, be explicit.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/ufs/chfs/chfs_inode.h
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/chfs/chfs_vnops.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/ufs/chfs/chfs_inode.h
diff -u src/sys/ufs/chfs/chfs_inode.h:1.4 src/sys/ufs/chfs/chfs_inode.h:1.5
--- src/sys/ufs/chfs/chfs_inode.h:1.4 Fri Apr 13 14:50:35 2012
+++ src/sys/ufs/chfs/chfs_inode.h Wed Apr 18 13:31:10 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_inode.h,v 1.4 2012/04/13 14:50:35 ttoth Exp $ */
+/* $NetBSD: chfs_inode.h,v 1.5 2012/04/18 13:31:10 joerg Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -58,8 +58,8 @@ enum chtype {
};
/* these macros are needed because the compatibility */
-#define CHTTOVT(ch_type) ch_type
-#define VTTOCHT(v_type) v_type
+#define CHTTOVT(ch_type) (enum vtype)(ch_type)
+#define VTTOCHT(v_type) (enum chtype)(v_type)
/* vtype replaced with chtype, these are only for compatibility */
static const enum chtype iftocht_tab[16] = {
Index: src/sys/ufs/chfs/chfs_vnops.c
diff -u src/sys/ufs/chfs/chfs_vnops.c:1.5 src/sys/ufs/chfs/chfs_vnops.c:1.6
--- src/sys/ufs/chfs/chfs_vnops.c:1.5 Tue Apr 17 19:15:16 2012
+++ src/sys/ufs/chfs/chfs_vnops.c Wed Apr 18 13:31:10 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: chfs_vnops.c,v 1.5 2012/04/17 19:15:16 christos Exp $ */
+/* $NetBSD: chfs_vnops.c,v 1.6 2012/04/18 13:31:10 joerg Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -1360,7 +1360,7 @@ chfs_readdir(void *v)
offset = uio->uio_offset;
if (offset == CHFS_OFFSET_DOT) {
- error = chfs_filldir(uio, ip->ino, ".", 1, VDIR);
+ error = chfs_filldir(uio, ip->ino, ".", 1, CHT_DIR);
if (error == -1) {
error = 0;
goto outok;
@@ -1377,7 +1377,7 @@ chfs_readdir(void *v)
chvc = chfs_vnode_cache_get(chmp, ip->ino);
mutex_exit(&chmp->chm_lock_vnocache);
- error = chfs_filldir(uio, chvc->pvno, "..", 2, VDIR);
+ error = chfs_filldir(uio, chvc->pvno, "..", 2, CHT_DIR);
if (error == -1) {
error = 0;
goto outok;