From 5604a4c265a39dce9fe8a62d14bb410074163083 Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 11 Jan 2015 03:05:03 +0000 Subject: [PATCH] Casting a gid_t to gid_t for a gid_t argument is overkill --- sys/ufs/ext2fs/ext2fs_vnops.c | 4 ++-- 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); -- 2.20.1