-/* $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
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;
}
-/* $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
}
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++);
}
/* 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) {
-/* $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
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);
-/* $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
*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;
-/* $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
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;
}
-/* $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 $ */
pmu_fileserver_mode(0);
pm_adb_poweroff();
- for (;;); /* wait for power off */
+ for (;;) /* wait for power off */
+ ;
return 0;
if (result != 0) /* exit if not sent */
return -1;
- for (;;); /* wait for power off */
+ for (;;) /* wait for power off */
+ ;
return 0;
-/* $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 $ */
/*-
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;
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;
-/* $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 $ */
/*-
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;
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;
-/* $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 $ */
/*
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;
}
-/* $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
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,
-/* $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 <patrick@blueri.se>
*
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;
}
-/* $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
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) {
-/* $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 <damien.bergamini@free.fr>
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)
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];
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];
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;
-/* $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 <mbalmer@openbsd.org>
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));
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));
-/* $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
* 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;
-/* $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
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;
-/* $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 <damien.bergamini@free.fr>
* Copyright (c) 2013-2014 Kevin Lo
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);
-/* $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 <damien.bergamini@free.fr>
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) {
-/* $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 <damien.bergamini@free.fr>
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)
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];
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];
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];
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];
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];
-/* $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 $ */
/*-
conv = 3;
dp--;
} else {
- for (dp = cp; *--dp == ' ' || *dp == '.';);
+ for (dp = cp; *--dp == ' ' || *dp == '.';)
+ ;
dp++;
}
*--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++] = '~';
/*
* 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;
/*
* 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;
-/* $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 <damien.bergamini@free.fr>
/* 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);
-/* $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 $ */
/*-
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;