[PATCH v2 15/17] ptrlist: use VRFY_PTR_LIST() for sanity check

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

 



DO_FINISH() contains a statement which only purpose is for
sanity check on the argument (for example, some scope switching).

Use VRFY_PTR_LIST() for this whose name is already somehow
self-explaining (and which do some additional type checking).

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 ptrlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ptrlist.h b/ptrlist.h
index 7d5f35b61..37d866de2 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -106,7 +106,7 @@ extern void __free_ptr_list(struct ptr_list **);
 	} while (0)
 
 #define DO_FINISH(ptr, __head, __list, __nr)				\
-		(void)(__nr); /* Sanity-check nesting */		\
+		VRFY_PTR_LIST(__head); /* Sanity-check nesting */	\
 	} while (0)
 
 #define PREPARE_PTR_LIST(head, ptr) \
-- 
2.17.1

--
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