From e9d0cc1e24f65b6d049dac7480e72beb74475dbc Mon Sep 17 00:00:00 2001 From: purplerain Date: Fri, 20 Sep 2024 05:15:09 +0000 Subject: [PATCH] sync with OpenBSD -current --- lib/libc/rpc/rpc_prot.c | 4 ++-- lib/libc/stdlib/malloc.c | 4 ++-- lib/libc/thread/rthread_mutex.c | 4 ++-- lib/libfuse/fuse_private.h | 6 +++--- lib/libutil/pkcs5_pbkdf2.c | 4 ++-- sbin/pfctl/parse.y | 4 ++-- share/man/man4/sec.4 | 6 +++--- sys/arch/amd64/amd64/pmap.c | 4 ++-- sys/arch/arm/arm/disassem.c | 4 ++-- sys/dev/acpi/dsdt.c | 4 ++-- sys/dev/ic/adv.c | 4 ++-- sys/dev/ic/adw.c | 6 +++--- sys/dev/ic/ami.c | 4 ++-- sys/dev/ic/rt2860.c | 4 ++-- sys/dev/ic/rtwn.c | 4 ++-- sys/dev/ic/ti.c | 6 +++--- sys/dev/pci/auixp.c | 14 ++++++------ sys/dev/pci/drm/apple/iomfb_template.c | 6 +++--- sys/dev/pci/drm/i915/display/intel_hdcp.c | 2 -- sys/dev/pci/drm/i915/i915_driver.c | 2 +- sys/dev/pci/if_ngbe.c | 4 ++-- sys/dev/pci/maestro.c | 4 ++-- sys/dev/pci/virtio_pci.c | 4 ++-- sys/dev/pci/vmwpvs.c | 6 +++--- sys/dev/pv/if_vio.c | 26 ++++++++++++++++------- sys/dev/usb/ubsa.c | 4 ++-- sys/isofs/udf/udf_vnops.c | 4 ++-- sys/lib/libsa/pkcs5_pbkdf2.c | 4 ++-- sys/net/if_pppx.c | 4 ++-- sys/net/route.c | 4 ++-- sys/ufs/ext2fs/ext2fs_lookup.c | 4 ++-- usr.bin/dig/lib/isc/regex.c | 2 +- usr.bin/mandoc/mdoc_validate.c | 4 ++-- usr.bin/mg/interpreter.c | 4 ++-- usr.bin/sort/bwstring.c | 4 ++-- usr.bin/sort/coll.c | 4 ++-- usr.bin/sort/file.c | 4 ++-- usr.bin/ssh/ssh-keyscan.c | 4 ++-- usr.bin/ssh/ssh-pkcs11.c | 6 +++--- usr.bin/ssh/version.h | 4 ++-- usr.bin/systat/if.c | 4 ++-- usr.bin/systat/main.c | 4 ++-- usr.bin/systat/netstat.c | 4 ++-- usr.sbin/bgpd/parse.y | 8 +++---- usr.sbin/bgplgd/bgplgd.8 | 12 +++++++++-- usr.sbin/mopd/common/print.c | 10 ++++----- usr.sbin/mopd/mopchk/mopchk.c | 4 ++-- usr.sbin/npppd/npppd/npppd_subr.c | 4 ++-- usr.sbin/relayd/util.c | 8 +++---- usr.sbin/rpki-client/repo.c | 4 ++-- usr.sbin/rpki-client/version.h | 4 ++-- usr.sbin/tftpd/tftpd.c | 4 ++-- usr.sbin/vmd/sev.c | 4 ++-- 53 files changed, 145 insertions(+), 129 deletions(-) diff --git a/lib/libc/rpc/rpc_prot.c b/lib/libc/rpc/rpc_prot.c index edf5a0cd1..501015c92 100644 --- a/lib/libc/rpc/rpc_prot.c +++ b/lib/libc/rpc/rpc_prot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rpc_prot.c,v 1.16 2020/08/30 23:15:31 mortimer Exp $ */ +/* $OpenBSD: rpc_prot.c,v 1.17 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -234,7 +234,7 @@ _seterr_reply(struct rpc_msg *msg, struct rpc_err *error) if (msg->acpted_rply.ar_stat == SUCCESS) { error->re_status = RPC_SUCCESS; return; - }; + } accepted(msg->acpted_rply.ar_stat, error); break; diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 53133956e..688e2a3c5 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.296 2024/03/30 07:50:39 miod Exp $ */ +/* $OpenBSD: malloc.c,v 1.297 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016, 2023 Otto Moerbeek * Copyright (c) 2012 Matthew Dempsky @@ -2350,7 +2350,7 @@ aligned_alloc(size_t alignment, size_t size) if (((alignment - 1) & alignment) != 0 || alignment == 0) { errno = EINVAL; return NULL; - }; + } /* Per spec, size should be a multiple of alignment */ if ((size & (alignment - 1)) != 0) { errno = EINVAL; diff --git a/lib/libc/thread/rthread_mutex.c b/lib/libc/thread/rthread_mutex.c index c9a490033..8f39feab9 100644 --- a/lib/libc/thread/rthread_mutex.c +++ b/lib/libc/thread/rthread_mutex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_mutex.c,v 1.5 2019/02/13 13:09:32 mpi Exp $ */ +/* $OpenBSD: rthread_mutex.c,v 1.6 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2017 Martin Pieuchot * Copyright (c) 2012 Philip Guenther @@ -197,7 +197,7 @@ _rthread_mutex_timedlock(pthread_mutex_t *mutexp, int trywait, * doubt set the state to CONTENDED. */ lock = atomic_swap_uint(&mutex->lock, CONTENDED); - }; + } membar_enter_after_atomic(); mutex->owner = self; diff --git a/lib/libfuse/fuse_private.h b/lib/libfuse/fuse_private.h index 208c99782..f598180cb 100644 --- a/lib/libfuse/fuse_private.h +++ b/lib/libfuse/fuse_private.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_private.h,v 1.22 2018/11/16 02:16:17 tedu Exp $ */ +/* $OpenBSD: fuse_private.h,v 1.23 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -134,13 +134,13 @@ char *build_realname(struct fuse *, ino_t); #define tree_empty(t) SPLAY_EMPTY((t)) int tree_check(struct tree *, uint64_t); void *tree_set(struct tree *, uint64_t, void *); -void *tree_get(struct tree *, uint64_t);; +void *tree_get(struct tree *, uint64_t); void *tree_pop(struct tree *, uint64_t); /* dict.c */ int dict_check(struct dict *, const char *); void *dict_set(struct dict *, const char *, void *); -void *dict_get(struct dict *, const char *);; +void *dict_get(struct dict *, const char *); void *dict_pop(struct dict *, const char *); #define FUSE_VERSION_PKG_INFO "2.8.0" diff --git a/lib/libutil/pkcs5_pbkdf2.c b/lib/libutil/pkcs5_pbkdf2.c index 7da657e74..4ad519e62 100644 --- a/lib/libutil/pkcs5_pbkdf2.c +++ b/lib/libutil/pkcs5_pbkdf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs5_pbkdf2.c,v 1.11 2019/11/21 16:07:24 tedu Exp $ */ +/* $OpenBSD: pkcs5_pbkdf2.c,v 1.12 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini @@ -111,7 +111,7 @@ pkcs5_pbkdf2(const char *pass, size_t pass_len, const uint8_t *salt, memcpy(key, obuf, r); key += r; key_len -= r; - }; + } freezero(asalt, salt_len + 4); explicit_bzero(d1, sizeof(d1)); explicit_bzero(d2, sizeof(d2)); diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 203209562..a694fbce2 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.716 2024/07/14 19:51:08 sashan Exp $ */ +/* $OpenBSD: parse.y,v 1.717 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -5609,7 +5609,7 @@ mv_tables(struct pfctl *pf, struct pfr_ktablehead *ktables, char *path_cut; int sz; struct pfr_uktable *ukt; - SLIST_HEAD(, pfr_uktable) ukt_list;; + SLIST_HEAD(, pfr_uktable) ukt_list; /* * Here we need to rename anchor path from temporal names such as diff --git a/share/man/man4/sec.4 b/share/man/man4/sec.4 index d0ebbbd85..dd172271a 100644 --- a/share/man/man4/sec.4 +++ b/share/man/man4/sec.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sec.4,v 1.5 2024/09/01 05:20:25 jsg Exp $ +.\" $OpenBSD: sec.4,v 1.6 2024/09/20 01:15:53 dlg Exp $ .\" .\" Copyright (c) 2023 David Gwynne .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 1 2024 $ +.Dd $Mdocdate: September 20 2024 $ .Dt SEC 4 .Os .Sh NAME @@ -96,7 +96,7 @@ A interface can be configured on the customer gateway: .Bd -literal -offset indent # ifconfig sec0 create -# ifconfig sec0 tunnel 169.254.229.42/30 169.254.229.41 +# ifconfig sec0 inet 169.254.229.42/30 169.254.229.41 # ifconfig sec0 up .Ed .Pp diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index c7d2dca5e..cf699b04f 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.173 2024/09/03 17:19:53 bluhm Exp $ */ +/* $OpenBSD: pmap.c,v 1.174 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -693,7 +693,7 @@ pmap_bootstrap(paddr_t first_avail, paddr_t max_pa) */ protection_codes[PROT_NONE] = pg_nx; /* --- */ - protection_codes[PROT_EXEC] = pg_xo; ; /* --x */ + protection_codes[PROT_EXEC] = pg_xo; /* --x */ protection_codes[PROT_READ] = PG_RO | pg_nx; /* -r- */ protection_codes[PROT_READ | PROT_EXEC] = PG_RO; /* -rx */ protection_codes[PROT_WRITE] = PG_RW | pg_nx; /* w-- */ diff --git a/sys/arch/arm/arm/disassem.c b/sys/arch/arm/arm/disassem.c index d42741ce1..2884f2315 100644 --- a/sys/arch/arm/arm/disassem.c +++ b/sys/arch/arm/arm/disassem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disassem.c,v 1.5 2018/06/30 15:23:35 deraadt Exp $ */ +/* $OpenBSD: disassem.c,v 1.6 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: disassem.c,v 1.14 2003/03/27 16:58:36 mycroft Exp $ */ /* @@ -522,7 +522,7 @@ disasm(const disasm_interface_t *di, vaddr_t loc, int altfmt) else di->di_printf(", "); } - }; + } di->di_printf("\n"); diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index d179cfdd1..78b10be0e 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.270 2024/08/06 17:38:56 kettenis Exp $ */ +/* $OpenBSD: dsdt.c,v 1.271 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave * @@ -1731,7 +1731,7 @@ aml_val_to_string(const struct aml_value *val) default: snprintf(buffer, sizeof(buffer), "Failed to convert type %d to string!", val->type); - }; + } return (buffer); } diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index e32f1da5b..fdc232da6 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.53 2022/04/16 19:19:58 naddy Exp $ */ +/* $OpenBSD: adv.c,v 1.54 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -468,7 +468,7 @@ adv_attach(ASC_SOFTC *sc) */ error = adv_alloc_ccbs(sc); if (error) - return; /* (error) */ ; + return; /* (error) */ /* * Create and initialize the Control Blocks. diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index e91d2b245..33e253ed3 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.70 2024/04/13 23:44:11 jsg Exp $ */ +/* $OpenBSD: adw.c,v 1.71 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -423,7 +423,7 @@ adw_attach(ADW_SOFTC *sc) */ error = adw_alloc_controls(sc); if (error) - return; /* (error) */ ; + return; /* (error) */ /* * Create and initialize the Control Blocks. @@ -444,7 +444,7 @@ adw_attach(ADW_SOFTC *sc) */ error = adw_alloc_carriers(sc); if (error) - return; /* (error) */ ; + return; /* (error) */ /* * Zero's the freeze_device status diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 98195eccd..8833497c8 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.263 2024/06/26 01:40:49 jsg Exp $ */ +/* $OpenBSD: ami.c,v 1.264 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -1772,7 +1772,7 @@ ami_mgmt(struct ami_softc *sc, u_int8_t opcode, u_int8_t par1, u_int8_t par2, cmd->acc_io.aio_param = par2; cmd->acc_io.aio_pad[0] = par3; break; - }; + } cmd->acc_io.aio_data = am ? htole32(AMIMEM_DVA(am)) : 0; diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c index 853e0492a..a9a5c8e7d 100644 --- a/sys/dev/ic/rt2860.c +++ b/sys/dev/ic/rt2860.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rt2860.c,v 1.103 2024/04/14 03:26:25 jsg Exp $ */ +/* $OpenBSD: rt2860.c,v 1.104 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -3271,7 +3271,7 @@ rt2860_read_eeprom(struct rt2860_softc *sc) sc->ext_5ghz_lna = (val >> 3) & 1; sc->ext_2ghz_lna = (val >> 2) & 1; /* check if RF supports automatic Tx access gain control */ - sc->calib_2ghz = sc->calib_5ghz = 0; /* XXX (val >> 1) & 1 */; + sc->calib_2ghz = sc->calib_5ghz = 0; /* XXX (val >> 1) & 1 */ /* check if we have a hardware radio switch */ sc->rfswitch = val & 1; } diff --git a/sys/dev/ic/rtwn.c b/sys/dev/ic/rtwn.c index 3df98b19f..0bc314e7d 100644 --- a/sys/dev/ic/rtwn.c +++ b/sys/dev/ic/rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwn.c,v 1.58 2024/06/26 01:40:49 jsg Exp $ */ +/* $OpenBSD: rtwn.c,v 1.59 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -2536,7 +2536,7 @@ rtwn_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c, rtwn_rf_write(sc, i, 0x87, 0x65); rtwn_rf_write(sc, i, 0x1c, 0); rtwn_rf_write(sc, i, 0xdf, 0x0140); - rtwn_rf_write(sc, i, 0x1b, 0x1c6c);; + rtwn_rf_write(sc, i, 0x1b, 0x1c6c); } } } diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c index a0052ad00..bd87afc77 100644 --- a/sys/dev/ic/ti.c +++ b/sys/dev/ic/ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ti.c,v 1.30 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: ti.c,v 1.31 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -781,7 +781,7 @@ ti_init_rx_ring_jumbo(struct ti_softc *sc) for (i = 0; i < TI_JUMBO_RX_RING_CNT; i++) { if (ti_newbuf_jumbo(sc, i, NULL, 0) == ENOBUFS) return (ENOBUFS); - }; + } TI_UPDATE_JUMBOPROD(sc, i - 1); sc->ti_jumbo = i - 1; @@ -812,7 +812,7 @@ ti_init_rx_ring_mini(struct ti_softc *sc) for (i = 0; i < TI_MSLOTS; i++) { if (ti_newbuf_mini(sc, i, NULL, 0) == ENOBUFS) return (ENOBUFS); - }; + } TI_UPDATE_MINIPROD(sc, i - 1); sc->ti_mini = i - 1; diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c index 8ba695515..953b4c698 100644 --- a/sys/dev/pci/auixp.c +++ b/sys/dev/pci/auixp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auixp.c,v 1.54 2024/08/18 14:42:56 deraadt Exp $ */ +/* $OpenBSD: auixp.c,v 1.56 2024/09/20 02:20:44 jsg Exp $ */ /* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */ /* @@ -145,7 +145,7 @@ void auixp_dma_update(struct auixp_softc *, struct auixp_dma *); void auixp_update_busbusy(struct auixp_softc *); #ifdef DEBUG_AUIXP -#define DPRINTF(x) printf x; +#define DPRINTF(x) printf x #else #define DPRINTF(x) #endif @@ -370,7 +370,7 @@ auixp_malloc(void *hdl, int direction, size_t size, int pool, int flags) } SLIST_INSERT_HEAD(&sc->sc_dma_list, dma, dma_chain); - DPRINTF(("auixp_malloc: returning kern %p, hw 0x%08x for %d bytes " + DPRINTF(("auixp_malloc: returning kern %p, hw 0x%08x for %zu bytes " "in %d segs\n", KERNADDR(dma), (u_int32_t) DMAADDR(dma), dma->size, dma->nsegs) ); @@ -1383,7 +1383,7 @@ auixp_reset_aclink(struct auixp_softc *sc) /* have to wait at least 10 usec for it to initialise */ DELAY(20); - }; + } printf("%s: soft resetting aclink\n", sc->sc_dev.dv_xname); @@ -1427,15 +1427,15 @@ auixp_reset_aclink(struct auixp_softc *sc) timeout--; if (timeout == 0) break; - }; + } if (timeout == 0) { printf("%s: giving up aclink reset\n", sc->sc_dev.dv_xname); - }; + } if (timeout != 10) { printf("%s: aclink hardware reset successful\n", sc->sc_dev.dv_xname); - }; + } /* assert reset and sync for safety */ value = bus_space_read_4(iot, ioh, ATI_REG_CMD); diff --git a/sys/dev/pci/drm/apple/iomfb_template.c b/sys/dev/pci/drm/apple/iomfb_template.c index dd9af89b9..e1230c708 100644 --- a/sys/dev/pci/drm/apple/iomfb_template.c +++ b/sys/dev/pci/drm/apple/iomfb_template.c @@ -796,7 +796,7 @@ void DCP_FW_NAME(iomfb_poweron)(struct apple_dcp *dcp) struct dcp_wait_cookie *cookie; int ret; u32 handle; - dev_err(dcp->dev, "dcp_poweron() starting\n"); + dev_info(dcp->dev, "dcp_poweron() starting\n"); cookie = kzalloc(sizeof(*cookie), GFP_KERNEL); if (!cookie) @@ -938,7 +938,7 @@ void DCP_FW_NAME(iomfb_poweroff)(struct apple_dcp *dcp) kref_put(&poff_cookie->refcount, release_wait_cookie); - dev_err(dcp->dev, "dcp_poweroff() done\n"); + dev_info(dcp->dev, "dcp_poweroff() done\n"); } static void last_client_closed_sleep(struct apple_dcp *dcp, void *out, void *cookie) @@ -983,7 +983,7 @@ void DCP_FW_NAME(iomfb_sleep)(struct apple_dcp *dcp) dev_warn(dcp->dev, "setDCPPower(0) timeout %u ms\n", 1000); kref_put(&cookie->refcount, release_wait_cookie); - dev_err(dcp->dev, "dcp_sleep() done\n"); + dev_info(dcp->dev, "dcp_sleep() done\n"); } static void dcpep_cb_hotplug(struct apple_dcp *dcp, u64 *connected) diff --git a/sys/dev/pci/drm/i915/display/intel_hdcp.c b/sys/dev/pci/drm/i915/display/intel_hdcp.c index e87a876fc..453d49ef7 100644 --- a/sys/dev/pci/drm/i915/display/intel_hdcp.c +++ b/sys/dev/pci/drm/i915/display/intel_hdcp.c @@ -2165,7 +2165,6 @@ static int initialize_hdcp_port_data(struct intel_connector *connector, struct intel_digital_port *dig_port, const struct intel_hdcp_shim *shim) { - STUB(); return -ENOSYS; #ifdef notyet struct drm_i915_private *i915 = to_i915(connector->base.dev); @@ -2225,7 +2224,6 @@ void intel_hdcp_component_init(struct drm_i915_private *i915) if (!is_hdcp2_supported(i915)) return; - STUB(); #ifdef notyet mutex_lock(&i915->display.hdcp.hdcp_mutex); drm_WARN_ON(&i915->drm, i915->display.hdcp.comp_added); diff --git a/sys/dev/pci/drm/i915/i915_driver.c b/sys/dev/pci/drm/i915/i915_driver.c index 00ab1ef51..5e3629934 100644 --- a/sys/dev/pci/drm/i915/i915_driver.c +++ b/sys/dev/pci/drm/i915/i915_driver.c @@ -2274,7 +2274,7 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux) & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) == (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) { dev_priv->primary = 1; - dev_priv->console = vga_is_console(pa->pa_iot, -1);; + dev_priv->console = vga_is_console(pa->pa_iot, -1); vga_console_attached = 1; } diff --git a/sys/dev/pci/if_ngbe.c b/sys/dev/pci/if_ngbe.c index bd8dbba31..1c254a2ac 100644 --- a/sys/dev/pci/if_ngbe.c +++ b/sys/dev/pci/if_ngbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ngbe.c,v 1.5 2024/05/24 06:02:56 jsg Exp $ */ +/* $OpenBSD: if_ngbe.c,v 1.6 2024/09/20 02:15:53 jsg Exp $ */ /* * Copyright (c) 2015-2017 Beijing WangXun Technology Co., Ltd. @@ -1707,7 +1707,7 @@ ngbe_initialize_transmit_unit(struct ngbe_softc *sc) struct tx_ring *txr; uint64_t tdba; uint32_t txdctl; - int i, wait_loop = NGBE_MAX_RX_DESC_POLL;; + int i, wait_loop = NGBE_MAX_RX_DESC_POLL; int error = 0; /* TDM_CTL.TE must be before Tx queues are enabled */ diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c index 02e9dc773..0eeea4077 100644 --- a/sys/dev/pci/maestro.c +++ b/sys/dev/pci/maestro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maestro.c,v 1.55 2024/09/04 07:54:52 mglocker Exp $ */ +/* $OpenBSD: maestro.c,v 1.56 2024/09/20 02:00:46 jsg Exp $ */ /* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */ /* * FreeBSD's ESS Agogo/Maestro driver @@ -627,7 +627,7 @@ maestro_attach(struct device *parent, struct device *self, void *aux) 0, &sc->iot, &sc->ioh, NULL, NULL, 0)) != 0) { printf(", can't map i/o space\n"); goto bad; - }; + } /* Allocate fixed DMA segment :-( */ sc->dmasize = MAESTRO_BUFSIZ * 16; diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c index 4a0c9037c..f9c8801ce 100644 --- a/sys/dev/pci/virtio_pci.c +++ b/sys/dev/pci/virtio_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio_pci.c,v 1.42 2024/09/02 08:26:26 sf Exp $ */ +/* $OpenBSD: virtio_pci.c,v 1.43 2024/09/19 06:19:05 sf Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -284,7 +284,7 @@ virtio_pci_setup_intrs(struct virtio_softc *vsc) if (sc->sc_irq_type == IRQ_NO_MSIX) return; - for (i = 0; i <= vsc->sc_nvqs; i++) { + for (i = 0; i < vsc->sc_nvqs; i++) { unsigned vec = vsc->sc_vqs[i].vq_intr_vec; virtio_pci_set_msix_queue_vector(sc, i, vec); } diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index 6ac67d1db..84d0a0d85 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.29 2024/09/04 07:54:52 mglocker Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.30 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2013 David Gwynne @@ -799,7 +799,7 @@ vmwpvs_msg_task(void *xsc) printf("%s: error probing target %d lun %d\n", DEVNAME(sc), letoh32(dvmsg->target), dvmsg->lun[1]); - }; + } break; case VMWPVS_MSG_T_REMOVED: @@ -817,7 +817,7 @@ vmwpvs_msg_task(void *xsc) printf("%s: error detaching target %d lun %d\n", DEVNAME(sc), letoh32(dvmsg->target), dvmsg->lun[1]); - }; + } break; default: diff --git a/sys/dev/pv/if_vio.c b/sys/dev/pv/if_vio.c index e9c5f8238..9b6a5452d 100644 --- a/sys/dev/pv/if_vio.c +++ b/sys/dev/pv/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.55 2024/09/17 09:00:14 sf Exp $ */ +/* $OpenBSD: if_vio.c,v 1.56 2024/09/19 06:23:38 sf Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -269,7 +269,6 @@ struct vio_softc { #define VIO_HAVE_MRG_RXBUF(sc) \ ((sc)->sc_hdr_size == sizeof(struct virtio_net_hdr)) -#define VIRTIO_NET_TX_MAXNSEGS 16 /* for larger chains, defrag */ #define VIRTIO_NET_CTRL_MAC_MC_ENTRIES 64 /* for more entries, use ALLMULTI */ #define VIRTIO_NET_CTRL_MAC_UC_ENTRIES 1 /* one entry for own unicast addr */ #define VIRTIO_NET_CTRL_TIMEOUT (5*1000*1000*1000ULL) /* 5 seconds */ @@ -321,7 +320,7 @@ int vio_ctrl_start(struct vio_softc *, uint8_t, uint8_t, int, int *); int vio_ctrl_submit(struct vio_softc *, int); void vio_ctrl_finish(struct vio_softc *); void vio_ctrl_wakeup(struct vio_softc *, enum vio_ctrl_state); -int vio_alloc_mem(struct vio_softc *); +int vio_alloc_mem(struct vio_softc *, int); int vio_alloc_dmamem(struct vio_softc *); void vio_free_dmamem(struct vio_softc *); @@ -416,7 +415,7 @@ vio_free_dmamem(struct vio_softc *sc) * viq_txmbufs[slot]: mbuf pointer array for sent frames */ int -vio_alloc_mem(struct vio_softc *sc) +vio_alloc_mem(struct vio_softc *sc, int tx_max_segments) { struct virtio_softc *vsc = sc->sc_virtio; struct ifnet *ifp = &sc->sc_ac.ac_if; @@ -503,7 +502,7 @@ vio_alloc_mem(struct vio_softc *sc) for (i = 0; i < txqsize; i++) { r = bus_dmamap_create(vsc->sc_dmat, txsize, - VIRTIO_NET_TX_MAXNSEGS, txsize, 0, + tx_max_segments, txsize, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW, &vioq->viq_txdmamaps[i]); if (r != 0) @@ -586,7 +585,7 @@ vio_attach(struct device *parent, struct device *self, void *aux) { struct vio_softc *sc = (struct vio_softc *)self; struct virtio_softc *vsc = (struct virtio_softc *)parent; - int i; + int i, tx_max_segments; struct ifnet *ifp = &sc->sc_ac.ac_if; if (vsc->sc_child != NULL) { @@ -650,6 +649,17 @@ vio_attach(struct device *parent, struct device *self, void *aux) else ifp->if_hardmtu = MCLBYTES - sc->sc_hdr_size - ETHER_HDR_LEN; + /* defrag for longer mbuf chains */ + tx_max_segments = 16; + if (virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO4) || + virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO6)) { + /* + * With TSO, we may get 64K packets and want to be able to + * send longer chains without defragmenting + */ + tx_max_segments = 32; + } + for (i = 0; i < sc->sc_nqueues; i++) { int vqidx = 2 * i; struct vio_queue *vioq = &sc->sc_q[i]; @@ -664,7 +674,7 @@ vio_attach(struct device *parent, struct device *self, void *aux) vqidx++; vioq->viq_txvq = &vsc->sc_vqs[vqidx]; if (virtio_alloc_vq(vsc, vioq->viq_txvq, vqidx, - VIRTIO_NET_TX_MAXNSEGS + 1, "tx") != 0) { + tx_max_segments + 1, "tx") != 0) { goto err; } vioq->viq_txvq->vq_done = vio_tx_intr; @@ -684,7 +694,7 @@ vio_attach(struct device *parent, struct device *self, void *aux) virtio_start_vq_intr(vsc, sc->sc_ctl_vq); } - if (vio_alloc_mem(sc) < 0) + if (vio_alloc_mem(sc, tx_max_segments) < 0) goto err; strlcpy(ifp->if_xname, self->dv_xname, IFNAMSIZ); diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index f9c168ad3..cdc200f9f 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsa.c,v 1.70 2024/05/23 03:21:09 jsg Exp $ */ +/* $OpenBSD: ubsa.c,v 1.71 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev . @@ -478,7 +478,7 @@ ubsa_baudrate(struct ubsa_softc *sc, speed_t speed) sc->sc_dev.dv_xname)); value = B230400 / B9600; break; - }; + } if (speed == B0) { ubsa_flow(sc, 0, 0); diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index e2dbabde7..7b847f1c3 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.73 2024/09/12 09:04:51 claudio Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.74 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long @@ -471,7 +471,7 @@ udf_read(void *v) } if (error) break; - }; + } return (error); } diff --git a/sys/lib/libsa/pkcs5_pbkdf2.c b/sys/lib/libsa/pkcs5_pbkdf2.c index 73cdb27c7..2340fbc81 100644 --- a/sys/lib/libsa/pkcs5_pbkdf2.c +++ b/sys/lib/libsa/pkcs5_pbkdf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs5_pbkdf2.c,v 1.1 2016/09/10 16:38:16 jsing Exp $ */ +/* $OpenBSD: pkcs5_pbkdf2.c,v 1.2 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (c) 2008 Damien Bergamini @@ -65,7 +65,7 @@ pkcs5_pbkdf2(const char *pass, size_t pass_len, const char *salt, memcpy(key, obuf, r); key += r; key_len -= r; - }; + } explicit_bzero(asalt, salt_len + 4); free(asalt, salt_len + 4); explicit_bzero(d1, sizeof(d1)); diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 806f3e878..c077839cc 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.130 2024/09/09 07:37:47 mvs Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.131 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2010 Claudio Jeker @@ -1069,7 +1069,7 @@ pppacopen(dev_t dev, int flags, int mode, struct proc *p) ifp->if_softc = sc; ifp->if_type = IFT_L3IPVLAN; - ifp->if_hdrlen = sizeof(uint32_t); /* for BPF */; + ifp->if_hdrlen = sizeof(uint32_t); /* for BPF */ ifp->if_mtu = MAXMCLBYTES - sizeof(uint32_t); ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST; ifp->if_xflags = IFXF_CLONED | IFXF_MPSAFE; diff --git a/sys/net/route.c b/sys/net/route.c index 028199bd4..4fef5e993 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.436 2024/03/31 15:53:12 bluhm Exp $ */ +/* $OpenBSD: route.c,v 1.437 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -1128,7 +1128,7 @@ rt_setgate(struct rtentry *rt, const struct sockaddr *gate, u_int rtableid) if (rt->rt_gateway == gate) { /* nop */ return (0); - }; + } sa = malloc(glen, M_RTABLE, M_NOWAIT | M_ZERO); if (sa == NULL) diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c index 435f8c7c6..5c5097d06 100644 --- a/sys/ufs/ext2fs/ext2fs_lookup.c +++ b/sys/ufs/ext2fs/ext2fs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_lookup.c,v 1.47 2024/09/12 09:04:51 claudio Exp $ */ +/* $OpenBSD: ext2fs_lookup.c,v 1.48 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: ext2fs_lookup.c,v 1.16 2000/08/03 20:29:26 thorpej Exp $ */ /* @@ -776,7 +776,7 @@ ext2fs_direnter(struct inode *ip, struct vnode *dvp, newdir.e2d_type = inot2ext2dt(IFTODT(ip->i_e2fs_mode)); } else { newdir.e2d_type = 0; - }; + } memcpy(newdir.e2d_name, cnp->cn_nameptr, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2FS_DIRSIZ(cnp->cn_namelen); if (dp->i_count == 0) { diff --git a/usr.bin/dig/lib/isc/regex.c b/usr.bin/dig/lib/isc/regex.c index d86faf462..a5da7e58e 100644 --- a/usr.bin/dig/lib/isc/regex.c +++ b/usr.bin/dig/lib/isc/regex.c @@ -251,7 +251,7 @@ isc_regex_validate(const char *c) { range_start = *c & 0xff; ++c; break; - }; + } break; case parse_ce: switch (*c) { diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index aa4756663..997d8b6a3 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_validate.c,v 1.306 2022/06/08 16:29:12 schwarze Exp $ */ +/* $OpenBSD: mdoc_validate.c,v 1.307 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2010-2021 Ingo Schwarze * Copyright (c) 2008-2012 Kristaps Dzonsons @@ -3042,6 +3042,6 @@ macro2len(enum roff_tok macro) return 10; default: break; - }; + } return 0; } diff --git a/usr.bin/mg/interpreter.c b/usr.bin/mg/interpreter.c index 800219212..b4ed04259 100644 --- a/usr.bin/mg/interpreter.c +++ b/usr.bin/mg/interpreter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interpreter.c,v 1.35 2023/04/17 10:11:30 op Exp $ */ +/* $OpenBSD: interpreter.c,v 1.36 2024/09/20 02:00:46 jsg Exp $ */ /* * This file is in the public domain. * @@ -395,7 +395,7 @@ parsexp(char *begp, const char *par1, const char *par2, int blkid, int expctr, { struct expentry *e1 = NULL; PF funcp; - char *cmdp, *fendp, *valp, *fname, *funb = NULL;; + char *cmdp, *fendp, *valp, *fname, *funb = NULL; int numparams, ret; cmdp = begp; diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index c899462f1..0ded6fd7a 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwstring.c,v 1.9 2019/05/15 09:33:34 schwarze Exp $ */ +/* $OpenBSD: bwstring.c,v 1.10 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (C) 2009 Gabor Kovesdan @@ -293,7 +293,7 @@ bwscsbdup(const unsigned char *str, size_t len) /* NOTREACHED */ err(2, "mbrtowc error"); cptr += charlen; - }; + } } ret->len = chars; diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c index 9faf50b0f..3631620be 100644 --- a/usr.bin/sort/coll.c +++ b/usr.bin/sort/coll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: coll.c,v 1.12 2019/05/13 17:00:12 schwarze Exp $ */ +/* $OpenBSD: coll.c,v 1.13 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (C) 2009 Gabor Kovesdan @@ -672,7 +672,7 @@ setsuffix(wchar_t c, unsigned char *si) break; default: *si = 0; - }; + } } /* diff --git a/usr.bin/sort/file.c b/usr.bin/sort/file.c index d3b97f5b2..a19ffa025 100644 --- a/usr.bin/sort/file.c +++ b/usr.bin/sort/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.23 2019/12/30 16:07:13 millert Exp $ */ +/* $OpenBSD: file.c,v 1.24 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (C) 2009 Gabor Kovesdan @@ -1102,7 +1102,7 @@ sort_list_to_file(struct sort_list *list, const char *outfile) default: errx(2, "The chosen sort method cannot be used with " "stable and/or unique sort"); - }; + } } if (sort_opts_vals.sort_method == SORT_DEFAULT) diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index df8abc2e6..76e8c12ae 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.161 2024/09/09 02:39:57 djm Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.162 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -624,7 +624,7 @@ do_host(char *host) if (addr_cmp(&addr, &end_addr) == 0) break; addr_increment(&addr); - }; + } } } diff --git a/usr.bin/ssh/ssh-pkcs11.c b/usr.bin/ssh/ssh-pkcs11.c index 97c98cc94..017425584 100644 --- a/usr.bin/ssh/ssh-pkcs11.c +++ b/usr.bin/ssh/ssh-pkcs11.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-pkcs11.c,v 1.63 2024/08/15 00:51:51 djm Exp $ */ +/* $OpenBSD: ssh-pkcs11.c,v 1.64 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2010 Markus Friedl. All rights reserved. * Copyright (c) 2014 Pedro Martelletto. All rights reserved. @@ -1171,7 +1171,7 @@ pkcs11_fetch_certs(struct pkcs11_provider *p, CK_ULONG slotidx, } note_key(p, slotidx, __func__, key); if (pkcs11_key_included(keysp, nkeys, key)) { - debug2_f("key already included");; + debug2_f("key already included"); sshkey_free(key); } else { /* expand key array and add key */ @@ -1283,7 +1283,7 @@ pkcs11_fetch_keys(struct pkcs11_provider *p, CK_ULONG slotidx, } note_key(p, slotidx, __func__, key); if (pkcs11_key_included(keysp, nkeys, key)) { - debug2_f("key already included");; + debug2_f("key already included"); sshkey_free(key); } else { /* expand key array and add key */ diff --git a/usr.bin/ssh/version.h b/usr.bin/ssh/version.h index 8491b8656..10c5d284b 100644 --- a/usr.bin/ssh/version.h +++ b/usr.bin/ssh/version.h @@ -1,3 +1,3 @@ -/* $OpenBSD: version.h,v 1.102 2024/07/01 04:31:59 djm Exp $ */ +/* $OpenBSD: version.h,v 1.103 2024/09/19 22:17:44 djm Exp $ */ -#define SSH_VERSION "OpenSSH_9.8" +#define SSH_VERSION "OpenSSH_9.9" diff --git a/usr.bin/systat/if.c b/usr.bin/systat/if.c index 66733cff0..55166b78b 100644 --- a/usr.bin/systat/if.c +++ b/usr.bin/systat/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.27 2021/11/29 06:39:23 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.28 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2004 Markus Friedl * @@ -488,7 +488,7 @@ if_keyboard_callback(int ch) break; default: return keyboard_callback(ch); - }; + } return 1; } diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index af425d97c..aba4fcb36 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.77 2022/12/04 18:01:57 cheloha Exp $ */ +/* $OpenBSD: main.c,v 1.78 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * Copyright (c) 2001 Daniel Hartmeier @@ -376,7 +376,7 @@ keyboard_callback(int ch) break; default: return 0; - }; + } return 1; } diff --git a/usr.bin/systat/netstat.c b/usr.bin/systat/netstat.c index e0117ddcd..82d8dc09d 100644 --- a/usr.bin/systat/netstat.c +++ b/usr.bin/systat/netstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netstat.c,v 1.46 2023/10/10 09:27:03 tb Exp $ */ +/* $OpenBSD: netstat.c,v 1.47 2024/09/20 02:00:46 jsg Exp $ */ /* $NetBSD: netstat.c,v 1.3 1995/06/18 23:53:07 cgd Exp $ */ /*- @@ -488,7 +488,7 @@ ns_keyboard_callback(int ch) break; default: return keyboard_callback(ch); - }; + } return 1; } diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 29af28a31..c2f24cc91 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.467 2024/08/22 08:17:54 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.468 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -4361,9 +4361,9 @@ parselargecommunity(struct community *c, char *s) getcommunity(q, 1, &c->data3, &dflag3) == -1) return (-1); c->flags = COMMUNITY_TYPE_LARGE; - c->flags |= dflag1 << 8;; - c->flags |= dflag2 << 16;; - c->flags |= dflag3 << 24;; + c->flags |= dflag1 << 8; + c->flags |= dflag2 << 16; + c->flags |= dflag3 << 24; return (0); } diff --git a/usr.sbin/bgplgd/bgplgd.8 b/usr.sbin/bgplgd/bgplgd.8 index fb3d0db12..ce9a9d393 100644 --- a/usr.sbin/bgplgd/bgplgd.8 +++ b/usr.sbin/bgplgd/bgplgd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgplgd.8,v 1.9 2024/08/15 09:13:13 claudio Exp $ +.\" $OpenBSD: bgplgd.8,v 1.11 2024/09/19 08:55:22 claudio Exp $ .\" .\" Copyright (c) 2021 Claudio Jeker .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 15 2024 $ +.Dd $Mdocdate: September 19 2024 $ .Dt BGPLGD 8 .Os .Sh NAME @@ -171,6 +171,14 @@ Show a list of all neighbors, including information about the session state and message counters. .El .Sh EXAMPLES +Add the following to +.Pa /etc/bgpd.conf +to have +.Xr bgpd 8 +open a second, restricted, control socket: +.Pp +.Dl socket \&"/var/run/bgpd.rsock\&" restricted +.Pp An example setup in .Xr httpd 8 is: diff --git a/usr.sbin/mopd/common/print.c b/usr.sbin/mopd/common/print.c index 266028c18..13df7d84c 100644 --- a/usr.sbin/mopd/common/print.c +++ b/usr.sbin/mopd/common/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.15 2024/04/23 13:34:51 jsg Exp $ */ +/* $OpenBSD: print.c,v 1.16 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -62,7 +62,7 @@ mopPrintBPTY(FILE *fd, u_char bpty) default: fprintf(fd, "Unknown"); break; - }; + } } void @@ -84,7 +84,7 @@ mopPrintPGTY(FILE *fd, u_char pgty) default: fprintf(fd, "Unknown"); break; - }; + } } void @@ -550,7 +550,7 @@ mopPrintInfo(FILE *fd, u_char *pkt, int *idx, u_short moplen, u_char mopcode, default: fprintf(fd, "Unknown\n"); break; - }; + } break; case MOP_K_INFO_DLTY: tmpc = mopGetChar(pkt, idx); @@ -568,7 +568,7 @@ mopPrintInfo(FILE *fd, u_char *pkt, int *idx, u_short moplen, u_char mopcode, default: fprintf(fd, "Unknown\n"); break; - }; + } break; case MOP_K_INFO_DLBSZ: tmps = mopGetShort(pkt, idx); diff --git a/usr.sbin/mopd/mopchk/mopchk.c b/usr.sbin/mopd/mopchk/mopchk.c index 15cf230db..82b3ad347 100644 --- a/usr.sbin/mopd/mopchk/mopchk.c +++ b/usr.sbin/mopd/mopchk/mopchk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mopchk.c,v 1.21 2023/09/06 11:03:30 jsg Exp $ */ +/* $OpenBSD: mopchk.c,v 1.22 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 1995-96 Mats O Jansson. All rights reserved. @@ -132,7 +132,7 @@ main(int argc, char **argv) if (GetMopFileInfo(&dl, INFO_PRINT) < 0) { printf("Some failure in GetMopFileInfo\n"); } - }; + } } (void)close(dl.ldfd); } diff --git a/usr.sbin/npppd/npppd/npppd_subr.c b/usr.sbin/npppd/npppd/npppd_subr.c index 7096ebb26..efadb216e 100644 --- a/usr.sbin/npppd/npppd/npppd_subr.c +++ b/usr.sbin/npppd/npppd/npppd_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_subr.c,v 1.22 2024/08/22 07:56:47 florian Exp $ */ +/* $OpenBSD: npppd_subr.c,v 1.23 2024/09/20 02:00:46 jsg Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -69,7 +69,7 @@ skip_space(const char *s) { const char *r; for (r = s; *r != '\0' && isspace((unsigned char)*r); r++) - ;; /* skip */ + ; /* skip */ return r; } diff --git a/usr.sbin/relayd/util.c b/usr.sbin/relayd/util.c index 65d6660e4..751e82c43 100644 --- a/usr.sbin/relayd/util.c +++ b/usr.sbin/relayd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.4 2023/06/21 07:49:24 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.5 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter @@ -149,7 +149,7 @@ host_status(enum host_status status) return ("unknown"); case HOST_UP: return ("up"); - }; + } /* NOTREACHED */ return ("invalid"); } @@ -173,7 +173,7 @@ table_check(enum table_check check) return ("send expect"); case CHECK_SCRIPT: return ("script"); - }; + } /* NOTREACHED */ return ("invalid"); } @@ -195,7 +195,7 @@ relay_state(enum relay_state state) return ("closed"); case STATE_DONE: return ("done"); - }; + } /* NOTREACHED */ return ("invalid"); } diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index 950568679..27ec6fc36 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.66 2024/09/03 15:37:03 tb Exp $ */ +/* $OpenBSD: repo.c,v 1.67 2024/09/19 20:48:36 tb Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -735,7 +735,7 @@ rrdp_session_parse(struct rrdprepo *rr) warnx("%s: reinitializing", rr->notifyuri); goto reset; } - if (arc4random_uniform(1 << RRDP_RANDOM_REINIT_MAX) < (1 << weeks)) { + if (arc4random_uniform(1U << RRDP_RANDOM_REINIT_MAX) < (1U << weeks)) { warnx("%s: reinitializing", rr->notifyuri); goto reset; } diff --git a/usr.sbin/rpki-client/version.h b/usr.sbin/rpki-client/version.h index fbccd5d6b..6740e59e4 100644 --- a/usr.sbin/rpki-client/version.h +++ b/usr.sbin/rpki-client/version.h @@ -1,3 +1,3 @@ -/* $OpenBSD: version.h,v 1.24 2024/08/19 12:44:33 job Exp $ */ +/* $OpenBSD: version.h,v 1.25 2024/09/19 13:45:07 job Exp $ */ -#define RPKI_VERSION "9.2" +#define RPKI_VERSION "9.3" diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index aec254a45..42839be10 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.51 2024/05/21 05:00:48 jsg Exp $ */ +/* $OpenBSD: tftpd.c,v 1.52 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -544,7 +544,7 @@ rewrite_res(int fd, short events, void *arg) tftp_open(client, filename); free(filename); - }; + } } int diff --git a/usr.sbin/vmd/sev.c b/usr.sbin/vmd/sev.c index b61034b33..11eed72b4 100644 --- a/usr.sbin/vmd/sev.c +++ b/usr.sbin/vmd/sev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sev.c,v 1.1 2024/09/11 15:42:52 bluhm Exp $ */ +/* $OpenBSD: sev.c,v 1.2 2024/09/20 02:00:46 jsg Exp $ */ /* * Copyright (c) 2023, 2024 Hans-Joerg Hoexer @@ -64,7 +64,7 @@ sev_init(struct vmd_vm *vm) if (psp_launch_start(&handle) < 0) { log_warnx("%s: launch failed", __func__); return (-1); - }; + } vm->vm_sev_handle = handle; if (psp_get_gstate(vm->vm_sev_handle, NULL, NULL, &gstate)) {