]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
src/testing.h: Support const pointers in CHECK_NOT_NULL().
authorFlorian Forster <octo@google.com>
Fri, 17 Jul 2020 08:33:14 +0000 (10:33 +0200)
committerFlorian Forster <octo@google.com>
Tue, 21 Jul 2020 15:30:10 +0000 (17:30 +0200)
src/testing.h

index 8299d8907bf8bc30297258edab66a336e63e2e4a..c1badcc8e3666f452dee242b94b8ac08af1f4574 100644 (file)
@@ -136,7 +136,7 @@ static int check_count__;
 
 #define CHECK_NOT_NULL(expr)                                                   \
   do {                                                                         \
-    void *ptr_;                                                                \
+    void const *ptr_;                                                          \
     ptr_ = (expr);                                                             \
     OK1(ptr_ != NULL, #expr);                                                  \
   } while (0)