From: jsg Date: Sun, 14 Apr 2024 03:26:25 +0000 (+0000) Subject: with empty body loops, put final semicolon on a new line for readability X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=36dba039b91cf453f3b66c370c50b00c9aa5378e;p=openbsd with empty body loops, put final semicolon on a new line for readability ok bluhm@ jca@ --- diff --git a/sys/arch/amd64/stand/libsa/biosdev.c b/sys/arch/amd64/stand/libsa/biosdev.c index f669d169fd7..c4f6da905e6 100644 --- a/sys/arch/amd64/stand/libsa/biosdev.c +++ b/sys/arch/amd64/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.36 2023/04/25 10:06:12 kn Exp $ */ +/* $OpenBSD: biosdev.c,v 1.37 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -724,7 +724,8 @@ biosdisk_errno(u_int error) if (error == 0) return 0; - for (p = tab; p->error && p->error != error; p++); + for (p = tab; p->error && p->error != error; p++) + ; return p->errno; } diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index d84f1d83000..2241bb37366 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.268 2023/01/06 19:10:18 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.269 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -508,7 +508,8 @@ cpuid() } if (cpu_type) - for (p = cpu_types; p->name[0] && p->cpuid != cpu_type; p++); + for (p = cpu_types; p->name[0] && p->cpuid != cpu_type; p++) + ; else for (p = cpu_types; p->name[0] && p->features != cpu_features; p++); @@ -831,7 +832,8 @@ btlb_insert(pa_space_t space, vaddr_t va, paddr_t pa, vsize_t *lenp, u_int prot) } /* align size */ - for (len = pdc_btlb.min_size << PGSHIFT; len < *lenp; len <<= 1); + for (len = pdc_btlb.min_size << PGSHIFT; len < *lenp; len <<= 1) + ; len >>= PGSHIFT; i = ffs(~mask) - 1; if (len > pdc_btlb.max_size || i < 0 || i >= btlb_max) { diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 036779495f3..a2bb4640d69 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.165 2024/01/05 19:34:19 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.166 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -298,7 +298,8 @@ trap(int type, struct trapframe *frame) fpp = (u_int64_t *)&hfp->hfp_regs; pex = (u_int32_t *)&fpp[0]; - for (i = 0, pex++; i < 7 && !*pex; i++, pex++); + for (i = 0, pex++; i < 7 && !*pex; i++, pex++) + ; flt = 0; if (i < 7) { u_int32_t stat = HPPA_FPU_OP(*pex); diff --git a/sys/arch/hppa/stand/libsa/dev_hppa.c b/sys/arch/hppa/stand/libsa/dev_hppa.c index 8ed4b5212ec..49fd6a605a6 100644 --- a/sys/arch/hppa/stand/libsa/dev_hppa.c +++ b/sys/arch/hppa/stand/libsa/dev_hppa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_hppa.c,v 1.17 2014/07/13 09:26:08 jasper Exp $ */ +/* $OpenBSD: dev_hppa.c,v 1.18 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -156,7 +156,8 @@ devboot(dev, p) *p++ = 'r'; #endif /* quick copy device name */ - for (q = pdc_devs[B_TYPE(dev)].name; (*p++ = *q++);); + for (q = pdc_devs[B_TYPE(dev)].name; (*p++ = *q++);) + ; unit = B_UNIT(dev); if (unit >= 10) { p[-1] = '0' + unit / 10; diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index 03f689d6271..87f63885656 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.101 2023/04/25 14:48:17 kn Exp $ */ +/* $OpenBSD: biosdev.c,v 1.102 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -723,7 +723,8 @@ biosdisk_errno(u_int error) if (error == 0) return 0; - for (p = tab; p->error && p->error != error; p++); + for (p = tab; p->error && p->error != error; p++) + ; return p->errno; } diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c index 8d1e309b4b6..baf7e4707b9 100644 --- a/sys/arch/macppc/dev/adb.c +++ b/sys/arch/macppc/dev/adb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb.c,v 1.51 2023/11/22 18:14:35 tobhe Exp $ */ +/* $OpenBSD: adb.c,v 1.52 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ @@ -1526,7 +1526,8 @@ adb_poweroff(void) pmu_fileserver_mode(0); pm_adb_poweroff(); - for (;;); /* wait for power off */ + for (;;) /* wait for power off */ + ; return 0; @@ -1539,7 +1540,8 @@ adb_poweroff(void) if (result != 0) /* exit if not sent */ return -1; - for (;;); /* wait for power off */ + for (;;) /* wait for power off */ + ; return 0; diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c index 3791ee2de2b..a41f15366a2 100644 --- a/sys/arch/macppc/dev/awacs.c +++ b/sys/arch/macppc/dev/awacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awacs.c,v 1.41 2024/03/03 02:40:10 gkoehler Exp $ */ +/* $OpenBSD: awacs.c,v 1.42 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */ /*- @@ -956,7 +956,8 @@ awacs_trigger_output(void *h, void *start, void *end, int bsize, DPRINTF("trigger_output %p %p 0x%x\n", start, end, bsize); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) return -1; @@ -999,7 +1000,8 @@ awacs_trigger_input(void *h, void *start, void *end, int bsize, DPRINTF("trigger_input %p %p 0x%x\n", start, end, bsize); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) return -1; diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c index a7b998296b2..8501ff7f46f 100644 --- a/sys/arch/macppc/dev/i2s.c +++ b/sys/arch/macppc/dev/i2s.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i2s.c,v 1.37 2022/10/26 20:19:07 kn Exp $ */ +/* $OpenBSD: i2s.c,v 1.38 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */ /*- @@ -592,7 +592,8 @@ i2s_trigger_output(void *h, void *start, void *end, int bsize, DPRINTF(("trigger_output %p %p 0x%x\n", start, end, bsize)); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) return -1; @@ -633,7 +634,8 @@ i2s_trigger_input(void *h, void *start, void *end, int bsize, DPRINTF(("trigger_input %p %p 0x%x\n", start, end, bsize)); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) return -1; diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c index ef9c7ffa204..6d887f7a3f9 100644 --- a/sys/arch/sparc64/stand/ofwboot/ofdev.c +++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdev.c,v 1.39 2023/06/03 21:37:53 krw Exp $ */ +/* $OpenBSD: ofdev.c,v 1.40 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */ /* @@ -105,7 +105,8 @@ filename(char *str, char *ppart) if (cp >= str && *cp == '-') { /* found arguments, make firmware ignore them */ *cp = 0; - for (cp = lp; *--cp && *cp != ',';); + for (cp = lp; *--cp && *cp != ',';) + ; if (*++cp >= 'a' && *cp <= 'a' + MAXPARTITIONS) *ppart = *cp; } diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 092d403b713..706872604bc 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.91 2022/04/16 19:19:59 naddy Exp $ */ +/* $OpenBSD: ciss.c,v 1.92 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -217,7 +217,8 @@ ciss_attach(struct ciss_softc *sc) sc->maxsg = MAXPHYS / PAGE_SIZE; i = sizeof(struct ciss_ccb) + sizeof(ccb->ccb_cmd.sgl[0]) * (sc->maxsg - 1); - for (sc->ccblen = 0x10; sc->ccblen < i; sc->ccblen <<= 1); + for (sc->ccblen = 0x10; sc->ccblen < i; sc->ccblen <<= 1) + ; total = sc->ccblen * sc->maxcmd; if ((error = bus_dmamem_alloc(sc->dmat, total, PAGE_SIZE, 0, diff --git a/sys/dev/ic/imxiic.c b/sys/dev/ic/imxiic.c index 3957c254415..0ba646ceae9 100644 --- a/sys/dev/ic/imxiic.c +++ b/sys/dev/ic/imxiic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxiic.c,v 1.1 2020/11/17 14:30:13 patrick Exp $ */ +/* $OpenBSD: imxiic.c,v 1.2 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 2013 Patrick Wildt * @@ -119,7 +119,8 @@ imxiic_setspeed(struct imxiic_softc *sc, u_int speed) else if (div > sc->sc_clk_div[sc->sc_clk_ndiv - 1].div) i = sc->sc_clk_ndiv - 1; else - for (i = 0; sc->sc_clk_div[i].div < div; i++); + for (i = 0; sc->sc_clk_div[i].div < div; i++) + ; sc->frequency = sc->sc_clk_div[i].val; } diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c index 478fdcac926..ed7f1707d17 100644 --- a/sys/dev/ic/rt2661.c +++ b/sys/dev/ic/rt2661.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2661.c,v 1.99 2022/04/21 21:03:02 stsp Exp $ */ +/* $OpenBSD: rt2661.c,v 1.100 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2006 @@ -2274,7 +2274,8 @@ rt2661_set_chan(struct rt2661_softc *sc, struct ieee80211_channel *c) rfprog = (sc->rfprog == 0) ? rt2661_rf5225_1 : rt2661_rf5225_2; /* find the settings for this channel (we know it exists) */ - for (i = 0; rfprog[i].chan != chan; i++); + for (i = 0; rfprog[i].chan != chan; i++) + ; power = sc->txpow[i]; if (power < 0) { diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 55b76f4404a..1bab22ffac2 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.102 2022/04/21 21:03:02 stsp Exp $ */ +/* $OpenBSD: rt2860.c,v 1.103 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -2225,7 +2225,8 @@ rt2860_set_chan(struct rt2860_softc *sc, u_int chan) u_int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rfprog[i].chan != chan; i++); + for (i = 0; rfprog[i].chan != chan; i++) + ; r2 = rfprog[i].r2; if (sc->ntxchains == 1) @@ -2281,7 +2282,8 @@ rt3090_set_chan(struct rt2860_softc *sc, u_int chan) KASSERT(chan >= 1 && chan <= 14); /* RT3090 is 2GHz only */ /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -2346,7 +2348,8 @@ rt5390_set_chan(struct rt2860_softc *sc, u_int chan) KASSERT(chan >= 1 && chan <= 14); /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -4054,10 +4057,12 @@ rt2860_calib(struct rt2860_softc *sc) if (bbp49 < tssi[0]) { /* lower than reference */ /* use higher Tx power than default */ - for (d = 0; d > -4 && bbp49 <= tssi[d - 1]; d--); + for (d = 0; d > -4 && bbp49 <= tssi[d - 1]; d--) + ; } else if (bbp49 > tssi[0]) { /* greater than reference */ /* use lower Tx power than default */ - for (d = 0; d < +4 && bbp49 >= tssi[d + 1]; d++); + for (d = 0; d < +4 && bbp49 >= tssi[d + 1]; d++) + ; } else { /* use default Tx power */ d = 0; diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c index a362789acc4..56507932fbf 100644 --- a/sys/dev/pci/auglx.c +++ b/sys/dev/pci/auglx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auglx.c,v 1.23 2022/10/26 20:19:08 kn Exp $ */ +/* $OpenBSD: auglx.c,v 1.24 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -669,7 +669,8 @@ auglx_trigger_output(void *v, void *start, void *end, int blksize, DPRINTF(AUGLX_DBG_DMA, ("%s: trigger_output, %p 0x%08x bytes, " "blksize 0x%04x\n", sc->sc_dev.dv_xname, start, size, blksize)); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) { DPRINTF(AUGLX_DBG_DMA, ("%s dma reg not found\n", sc->sc_dev.dv_xname)); @@ -730,7 +731,8 @@ auglx_trigger_input(void *v, void *start, void *end, int blksize, DPRINTF(AUGLX_DBG_DMA, ("%s: trigger_input, %p 0x%08x bytes, " "blksize 0x%04x\n", sc->sc_dev.dv_xname, start, size, blksize)); - for (p = sc->sc_dmas; p && p->addr != start; p = p->next); + for (p = sc->sc_dmas; p && p->addr != start; p = p->next) + ; if (!p) { DPRINTF(AUGLX_DBG_DMA, ("%s dma reg not found\n", sc->sc_dev.dv_xname)); diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 547daaed346..1eb9acc03c9 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.403 2024/02/11 06:40:46 jmc Exp $ */ +/* $OpenBSD: if_bge.c,v 1.404 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -4079,7 +4079,8 @@ bge_cksum_pad(struct mbuf *m) * Walk packet chain to find last mbuf. We will either * pad there, or append a new mbuf and pad it. */ - for (last = m; last->m_next != NULL; last = last->m_next); + for (last = m; last->m_next != NULL; last = last->m_next) + ; if (m_trailingspace(last) < padlen) { /* Allocate new empty mbuf, pad it. Compact later. */ struct mbuf *n; diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index a9fc9d5cecb..37b4d8c3a5f 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.133 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.134 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2004-2008 @@ -653,7 +653,8 @@ ipw_media_status(struct ifnet *ifp, struct ifmediareq *imr) val &= 0xf; /* convert rate to 802.11 rate */ - for (i = 0; i < nitems(rates) && rates[i].val != val; i++); + for (i = 0; i < nitems(rates) && rates[i].val != val; i++) + ; rate = (i < nitems(rates)) ? rates[i].rate : 0; imr->ifm_active |= IFM_IEEE80211_11B; diff --git a/sys/dev/usb/if_mtw.c b/sys/dev/usb/if_mtw.c index 30171930818..510866080d2 100644 --- a/sys/dev/usb/if_mtw.c +++ b/sys/dev/usb/if_mtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mtw.c,v 1.9 2024/04/12 09:56:39 jsg Exp $ */ +/* $OpenBSD: if_mtw.c,v 1.10 2024/04/14 03:26:25 jsg Exp $ */ /* * Copyright (c) 2008-2010 Damien Bergamini * Copyright (c) 2013-2014 Kevin Lo @@ -2549,7 +2549,8 @@ mt7601_set_chan(struct mtw_softc *sc, u_int chan) int i; /* find the settings for this channel */ - for (i = 0; mt7601_rf_chan[i].chan != chan; i++); + for (i = 0; mt7601_rf_chan[i].chan != chan; i++) + ; mtw_rf_write(sc, 0, 17, mt7601_rf_chan[i].r17); mtw_rf_write(sc, 0, 18, mt7601_rf_chan[i].r18); diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 9f8ce6a6c4e..fe08e053bca 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rum.c,v 1.127 2022/04/21 21:03:03 stsp Exp $ */ +/* $OpenBSD: if_rum.c,v 1.128 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2005-2007 Damien Bergamini @@ -1654,7 +1654,8 @@ rum_set_chan(struct rum_softc *sc, struct ieee80211_channel *c) sc->rf_rev == RT2573_RF_2527) ? rum_rf5225 : rum_rf5226; /* find the settings for this channel (we know it exists) */ - for (i = 0; rfprog[i].chan != chan; i++); + for (i = 0; rfprog[i].chan != chan; i++) + ; power = sc->txpow[i]; if (power < 0) { diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 2d4408dd3ac..436dd3267ce 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.138 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: if_run.c,v 1.139 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2008-2010 Damien Bergamini @@ -2906,7 +2906,8 @@ run_rt2870_set_chan(struct run_softc *sc, u_int chan) int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rfprog[i].chan != chan; i++); + for (i = 0; rfprog[i].chan != chan; i++) + ; r2 = rfprog[i].r2; if (sc->ntxchains == 1) @@ -2960,7 +2961,8 @@ run_rt3070_set_chan(struct run_softc *sc, u_int chan) int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -3026,7 +3028,8 @@ run_rt3572_set_chan(struct run_softc *sc, u_int chan) int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -3175,7 +3178,8 @@ run_rt3593_set_chan(struct run_softc *sc, u_int chan) int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -3335,7 +3339,8 @@ run_rt5390_set_chan(struct run_softc *sc, u_int chan) int i; /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; @@ -3451,7 +3456,8 @@ run_rt5592_set_chan(struct run_softc *sc, u_int chan) rt5592_freqs_40mhz : rt5592_freqs_20mhz; /* find the settings for this channel (we know it exists) */ - for (i = 0; rt2860_rf2850[i].chan != chan; i++, freqs++); + for (i = 0; rt2860_rf2850[i].chan != chan; i++, freqs++) + ; /* use Tx power values from EEPROM */ txpow1 = sc->txpow1[i]; diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index 11f263ee326..3927cf02614 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_conv.c,v 1.20 2019/09/04 14:40:22 cheloha Exp $ */ +/* $OpenBSD: msdosfs_conv.c,v 1.21 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: msdosfs_conv.c,v 1.24 1997/10/17 11:23:54 ws Exp $ */ /*- @@ -491,7 +491,8 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) conv = 3; dp--; } else { - for (dp = cp; *--dp == ' ' || *dp == '.';); + for (dp = cp; *--dp == ' ' || *dp == '.';) + ; dp++; } @@ -540,7 +541,8 @@ unix2dosfn(u_char *un, u_char dn[11], int unlen, u_int gen) *--cp = gen % 10 + '0'; if (gen) return 0; - for (i = 8; dn[--i] == ' ';); + for (i = 8; dn[--i] == ' ';) + ; if (gentext + sizeof(gentext) - cp + 1 > 8 - i) i = 8 - (gentext + sizeof(gentext) - cp + 1); dn[i++] = '~'; @@ -563,7 +565,8 @@ unix2winfn(u_char *un, int unlen, struct winentry *wep, int cnt, int chksum) /* * Drop trailing blanks and dots */ - for (cp = un + unlen; *--cp == ' ' || *cp == '.'; unlen--); + for (cp = un + unlen; *--cp == ' ' || *cp == '.'; unlen--) + ; un += (cnt - 1) * WIN_CHARS; unlen -= (cnt - 1) * WIN_CHARS; @@ -571,7 +574,8 @@ unix2winfn(u_char *un, int unlen, struct winentry *wep, int cnt, int chksum) /* * Initialize winentry to some useful default */ - for (cp = (u_int8_t *)wep, i = sizeof(*wep); --i >= 0; *cp++ = 0xff); + for (cp = (u_int8_t *)wep, i = sizeof(*wep); --i >= 0; *cp++ = 0xff) + ; wep->weCnt = cnt; wep->weAttributes = ATTR_WIN95; wep->weReserved1 = 0; diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index f13b535c7cb..8873924c2db 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.78 2021/05/11 08:46:31 stsp Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.79 2024/04/14 03:26:25 jsg Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini @@ -538,7 +538,8 @@ ieee80211_eapol_key_encrypt(struct ieee80211com *ic, /* set IV to the lower 16 octets of our global key counter */ memcpy(key->iv, ic->ic_globalcnt + 16, 16); /* increment our global key counter (256-bit, big-endian) */ - for (n = 31; n >= 0 && ++ic->ic_globalcnt[n] == 0; n--); + for (n = 31; n >= 0 && ++ic->ic_globalcnt[n] == 0; n--) + ; /* concatenate the EAPOL-Key IV field and the KEK */ memcpy(keybuf, key->iv, EAPOL_KEY_IV_LEN); diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index a89ac8c9155..a6161bf8e42 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_output.c,v 1.137 2022/03/14 15:07:24 stsp Exp $ */ +/* $OpenBSD: ieee80211_output.c,v 1.138 2024/04/14 03:26:25 jsg Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */ /*- @@ -798,14 +798,16 @@ ieee80211_add_tim(u_int8_t *frm, struct ieee80211com *ic) u_int i, offset = 0, len; /* find first non-zero octet in the virtual bit map */ - for (i = 0; i < ic->ic_tim_len && ic->ic_tim_bitmap[i] == 0; i++); + for (i = 0; i < ic->ic_tim_len && ic->ic_tim_bitmap[i] == 0; i++) + ; /* clear the lsb as it is reserved for the broadcast indication bit */ if (i < ic->ic_tim_len) offset = i & ~1; /* find last non-zero octet in the virtual bit map */ - for (i = ic->ic_tim_len - 1; i > 0 && ic->ic_tim_bitmap[i] == 0; i--); + for (i = ic->ic_tim_len - 1; i > 0 && ic->ic_tim_bitmap[i] == 0; i--) + ; len = i - offset + 1;