Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/chfs Don't depend on implicit enum casts, be explicit.



details:   https://anonhg.NetBSD.org/src/rev/28f668b1fb71
branches:  trunk
changeset: 778878:28f668b1fb71
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Apr 18 13:31:10 2012 +0000

description:
Don't depend on implicit enum casts, be explicit.

diffstat:

 sys/ufs/chfs/chfs_inode.h |  6 +++---
 sys/ufs/chfs/chfs_vnops.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 7469e22e8a59 -r 28f668b1fb71 sys/ufs/chfs/chfs_inode.h
--- a/sys/ufs/chfs/chfs_inode.h Wed Apr 18 11:28:30 2012 +0000
+++ b/sys/ufs/chfs/chfs_inode.h Wed Apr 18 13:31:10 2012 +0000
@@ -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 @@
 };
 
 /* 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] = {
diff -r 7469e22e8a59 -r 28f668b1fb71 sys/ufs/chfs/chfs_vnops.c
--- a/sys/ufs/chfs/chfs_vnops.c Wed Apr 18 11:28:30 2012 +0000
+++ b/sys/ufs/chfs/chfs_vnops.c Wed Apr 18 13:31:10 2012 +0000
@@ -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 @@
        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 @@
                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;



Home | Main Index | Thread Index | Old Index