From nobody Wed May 29 05:36:02 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vpym23kG6z5LnTW; Wed, 29 May 2024 05:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vpym22tQ9z4Zvj; Wed, 29 May 2024 05:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716960962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFNDVZn4rkjT8QkUS5Y5bOqbXx2V9MPiVdoYbZJzJSU=; b=NzchU0fS57wuIPkFV9AJZjQS0+8ODNJZSLDVHMuXt0YhhTZcjZ25F9etnJl34bJq3mtXOg 8AWlJqsckn+TPS7NLmqyDg2E2igMTzbtbLWd3wHRV1V+8f0200o2c9FaYfqjqRDaafX+SQ cinnWurKKp7R8d8IB/F5NgGA9e79BFQa9tmmAYZ3tL7wEvrs4Y5aD/643E9wDGoJE5SMQh 394z/UcMom8FUwX+pYJ2S3QT17WyRUF0c5jNXshblXap24faZ6/zdmvZ6UTKIE+k1OhWzc qObmB8oiPcxY26c5k806hp8Qg+T2ZgVvDxgGeEYdhavMt705xo2kI/IzkOTj1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716960962; a=rsa-sha256; cv=none; b=LVn9b0ZAqvwdQnRl6WVOdV6+MWWuQEEIqCwwYV7gtZFuL7RWTXIgX6MrPhsbUhJ3WJk9gI wDeqcTVp1mAOirs3fHCPziUzLbfIwCpVR3y9vIy71m7oc6a+i7xqi69Y2gm5iyepeGPiJI 4h5A3hsLSMvZRvlZGLocGAhoOl6sdMq4J5xcokghKMJN+1Zp7fXMdy90qtSvkW4+0S/+rh u0Z86NRk5nP7SmdTF/ncdE+YgdQS71d8sEF8zTI8inllPpVZELEtgXISBFSUaP8euxMcNP Lx+JtK8zsbJiMgw+RYmciGIQxQB0Bwj0fqZiC0jIAzpxoMt63yEz/iOu6OpXrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716960962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qFNDVZn4rkjT8QkUS5Y5bOqbXx2V9MPiVdoYbZJzJSU=; b=fYj6uTh3En/wJkTFM2SVTuI4A5h6LyzVZHK4y4Kz32IEZCzHC7G8BZg8ww14VyElcgaHu4 sxQt7X5aQH5rBOa8HVajqkDlxzD+s5VJWyDPBn5yh/lXPaX68ilqv8nQbvtxWRZV/Cw+pa WqIbMhr5nvetLFrVkBmyxsCpY1sKPW6QZGbrHjtYfvt7x2N9mfnGv4mOq+yI7ml2E6/6AH fvfl28a12Fh1B/0S5JgFhyUM/GIbYOTK5XOjs8PAzI7eKIavokJRX9ooNkIDidBxP12zV6 fxcSV7VvmJ1pHb5xcEoUVNwAv0cNGYNd6qNhnVRUeACP/comOiXEiLoqrvLhHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vpym22LDNzjyH; Wed, 29 May 2024 05:36:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44T5a2vF085984; Wed, 29 May 2024 05:36:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44T5a29u085981; Wed, 29 May 2024 05:36:02 GMT (envelope-from git) Date: Wed, 29 May 2024 05:36:02 GMT Message-Id: <202405290536.44T5a29u085981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 94d574327018 - stable/14 - mqueuefs: minor style pass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94d574327018ce6abfa34ed4e96ef104821d2889 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=94d574327018ce6abfa34ed4e96ef104821d2889 commit 94d574327018ce6abfa34ed4e96ef104821d2889 Author: Konstantin Belousov AuthorDate: 2024-05-22 02:52:47 +0000 Commit: Konstantin Belousov CommitDate: 2024-05-29 05:35:38 +0000 mqueuefs: minor style pass (cherry picked from commit 63f18b37e01ef214de762a091d3c98ae5028c8f4) --- sys/kern/uipc_mqueue.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index f7695945fcc4..bb2e2bab0ba7 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -50,7 +50,6 @@ * use the IPC facility without having to mount mqueue file system. */ -#include #include "opt_capsicum.h" #include @@ -379,7 +378,7 @@ mqfs_fileno_free(struct mqfs_info *mi, struct mqfs_node *mn) static __inline struct mqfs_node * mqnode_alloc(void) { - return uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO); + return (uma_zalloc(mqnode_zone, M_WAITOK | M_ZERO)); } static __inline void @@ -451,8 +450,8 @@ mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode, node->mn_type = nodetype; node->mn_refcount = 1; vfs_timestamp(&node->mn_birth); - node->mn_ctime = node->mn_atime = node->mn_mtime - = node->mn_birth; + node->mn_ctime = node->mn_atime = node->mn_mtime = + node->mn_birth; node->mn_uid = cred->cr_uid; node->mn_gid = cred->cr_gid; node->mn_mode = mode; @@ -1017,8 +1016,8 @@ mqfs_create(struct vop_create_args *ap) /* * Remove an entry */ -static -int do_unlink(struct mqfs_node *pn, struct ucred *ucred) +static int +do_unlink(struct mqfs_node *pn, struct ucred *ucred) { struct mqfs_node *parent; struct mqfs_vdata *vd; @@ -1244,15 +1243,15 @@ mqfs_setattr(struct vop_setattr_args *ap) td = curthread; vap = ap->a_vap; vp = ap->a_vp; - if ((vap->va_type != VNON) || - (vap->va_nlink != VNOVAL) || - (vap->va_fsid != VNOVAL) || - (vap->va_fileid != VNOVAL) || - (vap->va_blocksize != VNOVAL) || + if (vap->va_type != VNON || + vap->va_nlink != VNOVAL || + vap->va_fsid != VNOVAL || + vap->va_fileid != VNOVAL || + vap->va_blocksize != VNOVAL || (vap->va_flags != VNOVAL && vap->va_flags != 0) || - (vap->va_rdev != VNOVAL) || - ((int)vap->va_bytes != VNOVAL) || - (vap->va_gen != VNOVAL)) { + vap->va_rdev != VNOVAL || + (int)vap->va_bytes != VNOVAL || + vap->va_gen != VNOVAL) { return (EINVAL); } @@ -1281,7 +1280,7 @@ mqfs_setattr(struct vop_setattr_args *ap) * check in VOP_ACCESS() be enough? Also, are the group bits * below definitely right? */ - if (((ap->a_cred->cr_uid != pn->mn_uid) || uid != pn->mn_uid || + if ((ap->a_cred->cr_uid != pn->mn_uid || uid != pn->mn_uid || (gid != pn->mn_gid && !groupmember(gid, ap->a_cred))) && (error = priv_check(td, PRIV_MQ_ADMIN)) != 0) return (error); @@ -1291,7 +1290,7 @@ mqfs_setattr(struct vop_setattr_args *ap) } if (vap->va_mode != (mode_t)VNOVAL) { - if ((ap->a_cred->cr_uid != pn->mn_uid) && + if (ap->a_cred->cr_uid != pn->mn_uid && (error = priv_check(td, PRIV_MQ_ADMIN))) return (error); pn->mn_mode = vap->va_mode; @@ -1345,11 +1344,11 @@ mqfs_read(struct vop_read_args *ap) mq = VTOMQ(vp); snprintf(buf, sizeof(buf), - "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", - mq->mq_totalbytes, - mq->mq_maxmsg, - mq->mq_curmsgs, - mq->mq_msgsize); + "QSIZE:%-10ld MAXMSG:%-10ld CURMSG:%-10ld MSGSIZE:%-10ld\n", + mq->mq_totalbytes, + mq->mq_maxmsg, + mq->mq_curmsgs, + mq->mq_msgsize); buf[sizeof(buf)-1] = '\0'; len = strlen(buf); error = uiomove_frombuf(buf, len, uio); @@ -2014,7 +2013,7 @@ kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, AUDIT_ARG_MODE(mode); pdp = td->td_proc->p_pd; - cmode = (((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; mq = NULL; if ((flags & O_CREAT) != 0 && attr != NULL) { if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) @@ -2809,7 +2808,7 @@ freebsd32_kmq_timedsend(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error); @@ -2840,7 +2839,7 @@ freebsd32_kmq_timedreceive(struct thread *td, abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, abs_timeout); + uap->msg_prio, waitok, abs_timeout); out: fdrop(fp, td); return (error);