svn commit: r217167 - stable/8/sys/net
Bjoern A. Zeeb
bz at FreeBSD.org
Sat Jan 8 21:37:44 UTC 2011
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)
More information about the svn-src-all
mailing list