]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfs_dbg.h
xnu-2050.18.24.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_dbg.h
index 976885663d22ce90304db307b48b61cec5e78aff..f39271fe42e77a3314b9fc733144aefa0b4398a2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000, 2005 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -39,6 +39,7 @@
  */
 
 struct componentname;
+extern void Debugger(const char *message);
 
 /* Define the debugging stage...
                4 -> Do all, aggresive, call_kdp
@@ -93,7 +94,7 @@ extern int hfs_dbg_err;
     #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); } }