From 562bdbac4a5160cfcf29694a87b6037e7bd752a2 Mon Sep 17 00:00:00 2001 From: proski Date: Wed, 21 Nov 2007 22:44:32 +0000 Subject: [PATCH] Use void* to keep an address, not u_int32_t Pointers don't fit u_int32_t on 64-bit systems. Besides, conversion from pointers to integers and vice versa should be generally avoided. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2906 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ath/if_ath.c b/ath/if_ath.c index 61633af..76b7318 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -11468,10 +11468,11 @@ ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **buf, const ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf) #endif /* #ifdef IEEE80211_DEBUG_REFCNT */ { - u_int32_t bufaddr = 0; + void *bufaddr; + if ((buf == NULL) || ((*buf) == NULL)) return; - bufaddr = (u_int32_t)*buf; + bufaddr = (void *)*buf; #ifdef IEEE80211_DEBUG_REFCNT cleanup_ath_buf_debug(sc, (*buf), BUS_DMA_TODEVICE, func, line); #else @@ -11483,8 +11484,7 @@ ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf) DPRINTF(sc, ATH_DEBUG_TXBUF, "[TXBUF=%03d/%03d] %s:%d -> %s:%d returned txbuf %p.\n", ath_get_buffer_count(), ATH_TXBUF, - func, line, __func__, __LINE__, - (void*)bufaddr); + func, line, __func__, __LINE__, bufaddr); #endif /* #ifdef IEEE80211_DEBUG_REFCNT */ if (sc->sc_devstopped) { ++sc->sc_reapcount; -- 2.35.1