[PATCH 06/34] ptrlist: add ptr_cur_entry() to get iterator's current entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 ptrlist.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ptrlist.h b/ptrlist.h
index e308f437c..d271f9e04 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -73,6 +73,11 @@ static inline void *__ptr_entry(const struct ptr_list *l, unsigned int i)
 	return l->list[i];
 }
 
+static inline void *ptr_cur_entry(const struct ptr_cur *cur)
+{
+	return __ptr_entry(cur->l, cur->n);
+}
+
 #define PTR_ENTRY_NOTAG(h,i)	__ptr_entry(h, i)
 #define __PTR_STRIP_TAG(ptr)	(void *)(~3UL & (unsigned long)(ptr))
 #define __PTR_KEEP_TAG(ptr)	(ptr)
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux