ソースを参照

improve NAME_multilist_alone_MEMBER so it works just the same with attached lists

Samuel Thibault 7 年 前
コミット
152f70a5a4
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      src/common/list.h

+ 2 - 2
src/common/list.h

@@ -349,9 +349,9 @@ LIST_INLINE int ENAME##_multilist_empty_##MEMBER(struct ENAME##_multilist_##MEMB
 	return head->next == head; \
 } \
 \
-/* Test whether the element is alone in a detached list.  */ \
+/* Test whether the element is alone in a list.  */ \
 LIST_INLINE int ENAME##_multilist_alone_##MEMBER(TYPE *e) { \
-	return (e)->MEMBER.next == &e->MEMBER && (e)->MEMBER.prev == &(e)->MEMBER; \
+	return (e)->MEMBER.next == (e)->MEMBER.prev; \
 } \
 \
 /* Return the first element of the list.  */ \