summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-01-11 03:05:03 +0000
committerguenther <guenther@openbsd.org>2015-01-11 03:05:03 +0000
commit5604a4c265a39dce9fe8a62d14bb410074163083 (patch)
tree7c23b946e682af62a15015c3a0ac64e55347e61b
parentuse mallocarray() when reallocating the mux table (diff)
downloadwireguard-openbsd-5604a4c265a39dce9fe8a62d14bb410074163083.tar.xz
wireguard-openbsd-5604a4c265a39dce9fe8a62d14bb410074163083.zip
Casting a gid_t to gid_t for a gid_t argument is overkill
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c4
-rw-r--r--sys/ufs/ufs/ufs_vnops.c4
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);