The branch stable/13 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3426b8269cab35e8d8b3ab33a876bd5fffa9d070

commit 3426b8269cab35e8d8b3ab33a876bd5fffa9d070
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2024-05-22 02:52:47 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2024-05-29 05:36:13 +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 2038de9324fc..5256a00cd831 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 <sys/cdefs.h>
 #include "opt_capsicum.h"
 
 #include <sys/param.h>
@@ -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;
@@ -1020,8 +1019,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;
@@ -1247,15 +1246,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);
        }
 
@@ -1284,7 +1283,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);
@@ -1294,7 +1293,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;
@@ -1348,11 +1347,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);
@@ -2019,7 +2018,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)
@@ -2815,7 +2814,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);
@@ -2846,7 +2845,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);

Reply via email to