Date: Sat, 8 Jan 2011 21:37:44 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r217167 - stable/8/sys/net Message-ID: <201101082137.p08Lbiul010121@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sat Jan 8 21:37:43 2011 New Revision: 217167 URL: http://svn.freebsd.org/changeset/base/217167 Log: MFC r216859: Use NULL rather than 0 to invalidate a pointer. Rather than duplicating the LLE_FREE_LOCKED() macro code in LLE_FREE(), call it directly (like we do for the RT_* macros). Modified: stable/8/sys/net/if_llatbl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_llatbl.h ============================================================================== --- stable/8/sys/net/if_llatbl.h Sat Jan 8 21:02:27 2011 (r217166) +++ stable/8/sys/net/if_llatbl.h Sat Jan 8 21:37:43 2011 (r217167) @@ -115,19 +115,12 @@ struct llentry { LLE_WUNLOCK(lle); \ } \ /* guard against invalid refs */ \ - lle = 0; \ + lle = NULL; \ } while (0) #define LLE_FREE(lle) do { \ LLE_WLOCK(lle); \ - if ((lle)->lle_refcnt <= 1) \ - (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\ - else { \ - (lle)->lle_refcnt--; \ - LLE_WUNLOCK(lle); \ - } \ - /* guard against invalid refs */ \ - lle = NULL; \ + LLE_FREE_LOCKED(lle); \ } while (0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101082137.p08Lbiul010121>