[SKIPLIST]
authorColin Finck <colin@reactos.org>
Fri, 19 Jun 2015 12:33:45 +0000 (12:33 +0000)
committerColin Finck <colin@reactos.org>
Fri, 19 Jun 2015 12:33:45 +0000 (12:33 +0000)
Verify that SKIPLIST_LEVELS is in the required range using C_ASSERTs (thanks to Thomas for the hint!)

svn path=/branches/colins-printing-for-freedom/; revision=68192

reactos/lib/skiplist/skiplist.h

index 1313768..0e66839 100644 (file)
@@ -15,6 +15,9 @@
 #error Please define SKIPLIST_LEVELS to a value between 1 and 32.
 #endif
 
+C_ASSERT(SKIPLIST_LEVELS >= 1);
+C_ASSERT(SKIPLIST_LEVELS <= 32);
+
 // Function pointer definitions
 typedef PVOID (WINAPI *PSKIPLIST_ALLOCATE_ROUTINE)(DWORD);
 typedef int (WINAPI *PSKIPLIST_COMPARE_ROUTINE)(PVOID, PVOID);