From 9203aa8d03481199dcdbc74740b4ca6b2f70ee4e Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 31 Oct 2024 06:10:09 +0000 Subject: [PATCH] Debug: Fix documentation of `mlkem_debug_check_bounds()` `mlkem_debug_check_bounds()` and its wrapper macros `BOUNDS()` etc. are working with _exclusive_ bounds, but the documentation for `mlkem_debug_check_bounds()` wrongly stated that its bounds arguments would be inclusive. This commit fixes the documentation of `mlkem_debug_check_bounds()` to say that bounds are exclusive. No change to the code is needed: We only work with the wrapper macros, and those were already documented and used with exclusive bounds. Signed-off-by: Hanno Becker --- mlkem/debug/debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlkem/debug/debug.h b/mlkem/debug/debug.h index ef91c86b3..13b18418c 100644 --- a/mlkem/debug/debug.h +++ b/mlkem/debug/debug.h @@ -37,13 +37,13 @@ void mlkem_debug_assert(const char *file, int line, const char *description, * - description: Textual description of check * - ptr: Base of array to be checked * - len: Number of int16_t in ptr - * - lower_bound_inclusive: Inclusive lower bound - * - upper_bound_inclusive: Inclusive upper bound + * - lower_bound_exclusive: Exclusive lower bound + * - upper_bound_exclusive: Exclusive upper bound **************************************************/ void mlkem_debug_check_bounds(const char *file, int line, const char *description, const int16_t *ptr, - unsigned len, int lower_bound_inclusive, - int upper_bound_inclusive); + unsigned len, int lower_bound_exclusive, + int upper_bound_exclusive); /* Print error message to stderr alongside file and line information */ void mlkem_debug_print_error(const char *file, int line, const char *msg);