From d7a3e86314fae7d5ab8d30f276eae560920c95dd Mon Sep 17 00:00:00 2001 From: dlg Date: Sun, 5 Jun 2022 02:49:30 +0000 Subject: [PATCH] use the write lemtohXX functions for bits of the stats structure. unbreaks the build on bigendian archs. found by deraadt@ --- sys/dev/ic/re.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index e81147a49ce..3a33f91507f 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.212 2022/06/03 10:38:40 dlg Exp $ */ +/* $OpenBSD: re.c,v 1.213 2022/06/05 02:49:30 dlg Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -2521,9 +2521,9 @@ re_kstat_copy(struct kstat *ks, void *dst) kstat_kv_u32(&kvs->tx_mcol) = lemtoh32(&rs->re_tx_mcol); kstat_kv_u64(&kvs->rx_ok_phy) = lemtoh64(&rs->re_rx_ok_phy); kstat_kv_u64(&kvs->rx_ok_brd) = lemtoh64(&rs->re_rx_ok_brd); - kstat_kv_u32(&kvs->rx_ok_mul) = lemtoh64(&rs->re_rx_ok_mul); - kstat_kv_u16(&kvs->tx_abt) = lemtoh64(&rs->re_tx_abt); - kstat_kv_u16(&kvs->tx_undrn) = lemtoh64(&rs->re_tx_undrn); + kstat_kv_u32(&kvs->rx_ok_mul) = lemtoh32(&rs->re_rx_ok_mul); + kstat_kv_u16(&kvs->tx_abt) = lemtoh16(&rs->re_tx_abt); + kstat_kv_u16(&kvs->tx_undrn) = lemtoh16(&rs->re_tx_undrn); return (0); } -- 2.20.1