Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/ptyfs cast VNOVAL to the the va_size type which is u_...



details:   https://anonhg.NetBSD.org/src/rev/3073f3197c6b
branches:  trunk
changeset: 459816:3073f3197c6b
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 26 18:35:48 2019 +0000

description:
cast VNOVAL to the the va_size type which is u_quad_t... I think it is time
to change this to uint64_t...

diffstat:

 sys/fs/ptyfs/ptyfs_vnops.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 628221613592 -r 3073f3197c6b sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c        Thu Sep 26 17:52:50 2019 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c        Thu Sep 26 18:35:48 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $       */
+/*     $NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $        */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.56 2019/09/26 18:35:48 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -405,7 +405,7 @@
        kauth_action_t action = KAUTH_VNODE_WRITE_FLAGS;
        bool changing_sysflags = false;
 
-       if (vap->va_size != VNOVAL) {
+       if (vap->va_size != (u_quad_t)VNOVAL) {
                switch (ptyfs->ptyfs_type) {
                case PTYFSroot:
                        return EISDIR;
@@ -417,7 +417,7 @@
                }
        }
 
-       if (vap->va_flags != VNOVAL) {
+       if (vap->va_flags != (u_quad_t)VNOVAL) {
                if (vp->v_mount->mnt_flag & MNT_RDONLY)
                        return EROFS;
 



Home | Main Index | Thread Index | Old Index