ucx/cx/list.h

changeset 748
49a284f61e8c
parent 747
efbd59642577
child 750
4d7a2238c5ac
--- a/ucx/cx/list.h	Fri Apr 21 21:25:32 2023 +0200
+++ b/ucx/cx/list.h	Sun May 07 11:53:10 2023 +0200
@@ -136,7 +136,7 @@
     /**
      * Member function for finding an element.
      */
-    size_t (*find)(
+    ssize_t (*find)(
             struct cx_list_s const *list,
             void const *elem
     );
@@ -569,10 +569,11 @@
  *
  * @param list the list
  * @param elem the element to find
- * @return the index of the element or \c (size+1) if the element is not found
+ * @return the index of the element or a negative
+ * value when the element is not found
  */
 __attribute__((__nonnull__))
-static inline size_t cxListFind(
+static inline ssize_t cxListFind(
         CxList const *list,
         void const *elem
 ) {

mercurial