diff mbox series

[libnetfilter_queue,30/32] doc: Fix list_empty() doxygen comments

Message ID 20240315073347.22628-31-duncan_roe@optusnet.com.au
State New
Headers show
Series [libnetfilter_queue,01/32] src: Convert nfq_open() to use libmnl | expand

Commit Message

Duncan Roe March 15, 2024, 7:33 a.m. UTC
Need blank line between list_empty and list_entry.
Translate kerneldoc comments to doxygen.
Not all static inline functions are void any more.
Use \note instead of Note:.

Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 doxygen/Makefile.am                     | 2 +-
 include/libnetfilter_queue/linux_list.h | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
index 1784afa..4934e8e 100644
--- a/doxygen/Makefile.am
+++ b/doxygen/Makefile.am
@@ -14,7 +14,7 @@  doc_srcs = $(top_srcdir)/src/libnetfilter_queue.c\
 
 doxyfile.stamp: $(doc_srcs) Makefile build_man.sh
 	rm -rf html man
-	sed '/^static inline void [^_]/s/static //' \
+	sed '/^static inline [^ ]* [^_]/s/static //' \
 	  $(top_srcdir)/include/libnetfilter_queue/linux_list.h > linux_list.h
 	doxygen doxygen.cfg >/dev/null
 	rm linux_list.h
diff --git a/include/libnetfilter_queue/linux_list.h b/include/libnetfilter_queue/linux_list.h
index 76d24ea..f687d20 100644
--- a/include/libnetfilter_queue/linux_list.h
+++ b/include/libnetfilter_queue/linux_list.h
@@ -131,7 +131,8 @@  static inline void __list_del(struct list_head * prev, struct list_head * next)
 /**
  * list_del - deletes entry from list.
  * \param entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is
+ * \note
+ * list_empty() on **entry** does not return true after this, **entry** is
  * in an undefined state.
  */
 static inline void list_del(struct list_head *entry)
@@ -143,12 +144,14 @@  static inline void list_del(struct list_head *entry)
 
 /**
  * list_empty - tests whether a list is empty
- * @head: the list to test.
+ * \param head: the list to test.
+ * \return 1 if list is empty, 0 otherwise
  */
 static inline int list_empty(const struct list_head *head)
 {
 	return head->next == head;
 }
+
 /**
  * list_entry - get the struct for this entry
  * \param ptr:	the &struct list_head pointer.