From 3ee8ba5e329576c2230826f0cb63b13f531738d4 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Thu, 11 May 2000 16:18:01 +0000 Subject: [PATCH] expand on why magic numbers need to be first in the structure --- lib/isc/include/isc/magic.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/isc/include/isc/magic.h b/lib/isc/include/isc/magic.h index ac42a66b31..e0665158cf 100644 --- a/lib/isc/include/isc/magic.h +++ b/lib/isc/include/isc/magic.h @@ -25,7 +25,10 @@ typedef struct { /* * To use this macro the magic number MUST be the first thing in the - * structure, and MUST be of type "unsigned int" + * structure, and MUST be of type "unsigned int". + * + * The intent of this is to allow magic numbers to be checked even though + * the object is otherwise opaque. */ #define ISC_MAGIC_VALID(a,b) (((a) != NULL) \ && (((isc__magic_t *)(a))->magic == (b)))