From 1f4b72f7f61dadac090ea892dbcb0377c5b011d6 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Wed, 21 Apr 2004 20:09:45 +0000 Subject: [PATCH] Use offsetof() instead of hand-rolling something equivalent. --- sys/dev/asr/asr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 511163aab887..888e07e71f88 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -2634,7 +2634,7 @@ asr_attach (ATTACH_ARGS) sc->ha_SystemTable.InboundMessageFrameSize = status->InboundMFrameSize; sc->ha_SystemTable.MessengerInfo.InboundMessagePortAddressLow - = (U32)(sc->ha_Base) + (U32)(&(((i2oRegs_t *)NULL)->ToFIFO)); + = (U32)(sc->ha_Base) + (U32)offsetof(i2oRegs_t, ToFIFO); if (!asr_pci_map_int(tag, (void *)sc)) { printf ("asr%d: could not map interrupt\n", unit);