/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
*/
struct componentname;
+extern void Debugger(const char *message);
/* Define the debugging stage...
4 -> Do all, aggresive, call_kdp
#if (HFS_DEBUG_STAGE == 4)
char gDebugAssertStr[255];
#define DBG_ASSERT(a) { if (!(a)) { \
- sprintf(gDebugAssertStr,"Oops - File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); \
+ snprintf(gDebugAssertStr, sizeof (gDebugAssertStr), "Oops - File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); \
Debugger(gDebugAssertStr); } }
#else
#define DBG_ASSERT(a) { if (!(a)) { panic("File "__FILE__", line %d: assertion '%s' failed.\n", __LINE__, #a); } }