Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Unwrap a long line and remove unecessary bracket...



details:   https://anonhg.NetBSD.org/src/rev/63e646e7cb20
branches:  trunk
changeset: 368828:63e646e7cb20
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Aug 07 08:24:23 2022 +0000

description:
Unwrap a long line and remove unecessary brackets. NFC.

diffstat:

 sys/dev/pci/if_bge.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (40 lines):

diff -r 5afefec0d0a5 -r 63e646e7cb20 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Sun Aug 07 08:19:38 2022 +0000
+++ b/sys/dev/pci/if_bge.c      Sun Aug 07 08:24:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.370 2022/08/07 08:19:38 skrll Exp $       */
+/*     $NetBSD: if_bge.c,v 1.371 2022/08/07 08:24:23 skrll Exp $       */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.370 2022/08/07 08:19:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.371 2022/08/07 08:24:23 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1424,17 +1424,15 @@
 {
        struct bge_jpool_entry *entry;
        struct bge_softc * const sc = arg;
-       int i, s;
+       int s;
 
        if (sc == NULL)
                panic("bge_jfree: can't find softc pointer!");
 
        /* calculate the slot this buffer belongs to */
-
-       i = ((char *)buf
-            - (char *)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN;
-
-       if ((i < 0) || (i >= BGE_JSLOTS))
+       int i = ((char *)buf - (char *)sc->bge_cdata.bge_jumbo_buf) / BGE_JLEN;
+
+       if (i < 0 || i >= BGE_JSLOTS)
                panic("bge_jfree: asked to free buffer that we don't manage!");
 
        s = splvm();



Home | Main Index | Thread Index | Old Index