diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-01-11 03:05:04 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-01-11 03:05:04 +0000 |
commit | e83e53d88bf55a4d4c2c6e87ca33b8340f57e2d9 (patch) | |
tree | 41a43790a611c6886e544d1bb84f7b0c60e7edd7 | |
parent | 57b6b685cfa11c1fe5199c2c32466e032e984bf0 (diff) |
Casting a gid_t to gid_t for a gid_t argument is overkill
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vnops.c | 4 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index ec466402869..974a68fe7ff 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.69 2014/12/29 05:29:28 miod Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.70 2015/01/11 03:05:03 guenther Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -372,7 +372,7 @@ ext2fs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred, struct * the caller must be superuser or the call fails. */ if ((cred->cr_uid != ip->i_e2fs_uid || uid != ip->i_e2fs_uid || - (gid != ip->i_e2fs_gid && !groupmember((gid_t)gid, cred))) && + (gid != ip->i_e2fs_gid && !groupmember(gid, cred))) && (error = suser_ucred(cred))) return (error); ogid = ip->i_e2fs_gid; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index ae0e0ebb68c..27594979963 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.117 2014/12/29 05:29:28 miod Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.118 2015/01/11 03:05:03 guenther Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -511,7 +511,7 @@ ufs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred, * the caller must be superuser or the call fails. */ if ((cred->cr_uid != DIP(ip, uid) || uid != DIP(ip, uid) || - (gid != DIP(ip, gid) && !groupmember((gid_t)gid, cred))) && + (gid != DIP(ip, gid) && !groupmember(gid, cred))) && (error = suser_ucred(cred))) return (error); ogid = DIP(ip, gid); |