From 8a61a4eec41257f8625c5ce5029fc8811b319a73 Mon Sep 17 00:00:00 2001
From: Kip Macy <kmacy@FreeBSD.org>
Date: Tue, 16 Dec 2008 00:20:15 +0000
Subject: [PATCH] add macro for destroying an llentry's rwlock

---
 sys/net/if_llatbl.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h
index 9e73405b6c57..50e617d9d679 100644
--- a/sys/net/if_llatbl.h
+++ b/sys/net/if_llatbl.h
@@ -81,6 +81,7 @@ struct llentry {
 #define	LLE_DOWNGRADE(lle)	rw_downgrade(&(lle)->lle_lock)
 #define	LLE_TRY_UPGRADE(lle)	rw_try_upgrade(&(lle)->lle_lock)
 #define	LLE_LOCK_INIT(lle)	rw_init_flags(&(lle)->lle_lock, "lle", RW_DUPOK)
+#define	LLE_LOCK_DESTROY(lle)	rw_destroy(&(lle)->lle_lock)
 #define	LLE_WLOCK_ASSERT(lle)	rw_assert(&(lle)->lle_lock, RA_WLOCKED)
 
 #define LLE_IS_VALID(lle)	(((lle) != NULL) && ((lle) != (void *)-1))
@@ -119,7 +120,7 @@ struct llentry {
 		LLE_WUNLOCK(lle);				\
 	}							\
 	/* guard against invalid refs */			\
-	lle = 0;						\
+	lle = NULL;						\
 } while (0)