From f1377fcb7cef8dc36afa8497fd4f2a59a53a292e Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Fri, 19 Jun 2015 12:33:45 +0000 Subject: [PATCH] [SKIPLIST] 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/lib/skiplist/skiplist.h b/reactos/lib/skiplist/skiplist.h index 1313768f4a9..0e668396043 100644 --- a/reactos/lib/skiplist/skiplist.h +++ b/reactos/lib/skiplist/skiplist.h @@ -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);