[Git][NTPsec/ntpsec][master] LISTs: remove 4 unused macros, comment out unused debug code.

Gary E. Miller gitlab at mg.gitlab.com
Thu Jun 8 20:16:29 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
eadb7a97 by Gary E. Miller at 2017-06-08T13:15:22-07:00
LISTs: remove 4 unused macros, comment out unused debug code.

- - - - -


1 changed file:

- include/ntp_lists.h


Changes:

=====================================
include/ntp_lists.h
=====================================
--- a/include/ntp_lists.h
+++ b/include/ntp_lists.h
@@ -209,6 +209,7 @@ do {								\
 	UNLINK_EXPR_SLIST(punlinked, listhead, (ptounlink) ==	\
 	    U_E_S_CUR(), nextlink, entrytype)
 
+/* might be useful for debug someday
 #define CHECK_SLIST(listhead, nextlink, entrytype)		\
 do {								\
 	entrytype *pentry;					\
@@ -220,6 +221,7 @@ do {								\
 		INSIST((listhead) != pentry->nextlink);	\
 	}							\
 } while (false)
+*/
 
 /*
  * FIFO
@@ -232,9 +234,6 @@ struct {							\
 }
 
 #define HEAD_FIFO(anchor)	((anchor).phead)
-#define TAIL_FIFO(anchor)	((NULL == (anchor).pptail)	\
-					? NULL			\
-					: *((anchor).pptail))
 
 /*
  * For DEBUG builds only, verify both or neither of the anchor pointers
@@ -378,13 +377,6 @@ do {								\
 		    : NULL					\
 	)
 
-#define NEXT_DLIST(listhead, entry, link)			\
-	(							\
-		(&(listhead) != (entry)->link.f)		\
-		    ? (entry)->link.f				\
-		    : NULL					\
-	)
-
 #define PREV_DLIST(listhead, entry, link)			\
 	(							\
 		(&(listhead) != (entry)->link.b)		\
@@ -428,16 +420,4 @@ do {								\
 	}							\
 }
 
-#define REV_ITER_DLIST_BEGIN(listhead, iter, link, entrytype)	\
-{								\
-	entrytype *i_dl_nextiter;				\
-								\
-	for ((iter) = (listhead).link.b;			\
-	     (iter) != &(listhead)				\
-	     && ((i_dl_nextiter = (iter)->link.b), true);	\
-	     (iter) = i_dl_nextiter) {
-#define REV_ITER_DLIST_END()					\
-	}							\
-}
-
 #endif	/* GUARD_NTP_LISTS_H */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/eadb7a970f34ac884692d2b8465bf0b0f56824eb

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/eadb7a970f34ac884692d2b8465bf0b0f56824eb
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170608/b8d4f293/attachment.html>


More information about the vc mailing list