Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2021 17:24:52 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 571a1a64b199 - main - Minor style tidy: if( -> if (
Message-ID:  <202104181724.13IHOqRB034110@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=571a1a64b1992f917f6af60ca80e5a465986305e

commit 571a1a64b1992f917f6af60ca80e5a465986305e
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-04-18 17:19:15 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-04-18 17:19:15 +0000

    Minor style tidy: if( -> if (
    
    Fix a few 'if(' to be 'if (' in a few places, per style(9) and
    overwhelming usage in the rest of the kernel / tree.
    
    MFC After:              3 days
    Sponsored by:           Netflix
---
 sys/kern/kern_physio.c   | 2 +-
 sys/kern/kern_sysctl.c   | 2 +-
 sys/kern/vfs_cluster.c   | 2 +-
 sys/kern/vfs_mountroot.c | 3 +--
 sys/sys/buf_ring.h       | 2 +-
 sys/sys/efi.h            | 2 +-
 sys/sys/tree.h           | 2 +-
 7 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index 3185e77aba46..2d384b6b9a60 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -61,7 +61,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag)
 		return (ENXIO);
 
 	/* XXX: sanity check */
-	if(dev->si_iosize_max < PAGE_SIZE) {
+	if (dev->si_iosize_max < PAGE_SIZE) {
 		printf("WARNING: %s si_iosize_max=%d, using DFLTPHYS.\n",
 		    devtoname(dev), dev->si_iosize_max);
 		dev->si_iosize_max = DFLTPHYS;
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index ffb6ac196ba3..011e3f44a124 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -679,7 +679,7 @@ sysctl_ctx_entry_find(struct sysctl_ctx_list *clist, struct sysctl_oid *oidp)
 	if (clist == NULL || oidp == NULL)
 		return(NULL);
 	TAILQ_FOREACH(e, clist, link) {
-		if(e->entry == oidp)
+		if (e->entry == oidp)
 			return(e);
 	}
 	return (e);
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 7e328454c877..7ca67c390b91 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -371,7 +371,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
 		tbp->b_iocmd = BIO_READ;
 	}
 	tbp->b_blkno = blkno;
-	if( (tbp->b_flags & B_MALLOC) ||
+	if ( (tbp->b_flags & B_MALLOC) ||
 		((tbp->b_flags & B_VMIO) == 0) || (run <= 1) )
 		return tbp;
 
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c
index 3b968fd19bbd..65d52cc68bcd 100644
--- a/sys/kern/vfs_mountroot.c
+++ b/sys/kern/vfs_mountroot.c
@@ -1138,8 +1138,7 @@ parse_mountroot_options(struct mntarg *ma, const char *options)
 			*val = '\0';
 			++val;
 		}
-		if( strcmp(name, "rw") == 0 ||
-		    strcmp(name, "noro") == 0) {
+		if (strcmp(name, "rw") == 0 || strcmp(name, "noro") == 0) {
 			/*
 			 * The first time we mount the root file system,
 			 * we need to mount 'ro', so We need to ignore
diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h
index 48c7101aad97..9622503e1f96 100644
--- a/sys/sys/buf_ring.h
+++ b/sys/sys/buf_ring.h
@@ -73,7 +73,7 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
 	 */
 	for (i = br->br_cons_head; i != br->br_prod_head;
 	     i = ((i + 1) & br->br_cons_mask))
-		if(br->br_ring[i] == buf)
+		if (br->br_ring[i] == buf)
 			panic("buf=%p already enqueue at %d prod=%d cons=%d",
 			    buf, i, br->br_prod_tail, br->br_cons_tail);
 #endif	
diff --git a/sys/sys/efi.h b/sys/sys/efi.h
index 5875e87b3595..0c0b52afc81d 100644
--- a/sys/sys/efi.h
+++ b/sys/sys/efi.h
@@ -203,7 +203,7 @@ extern const struct efi_ops *active_efi_ops;
 static inline int efi_rt_ok(void)
 {
 
-	if(active_efi_ops->rt_ok == NULL)
+	if (active_efi_ops->rt_ok == NULL)
 		return (ENXIO);
 	return (active_efi_ops->rt_ok());
 }
diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index eb5f244d8a12..bc01e4de910a 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -179,7 +179,7 @@ name##_SPLAY_INSERT(struct name *head, struct type *elm)		\
 	    int __comp;							\
 	    name##_SPLAY(head, elm);					\
 	    __comp = (cmp)(elm, (head)->sph_root);			\
-	    if(__comp < 0) {						\
+	    if (__comp < 0) {						\
 		    SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
 		    SPLAY_RIGHT(elm, field) = (head)->sph_root;		\
 		    SPLAY_LEFT((head)->sph_root, field) = NULL;		\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104181724.13IHOqRB034110>