فهرست منبع

LibC: Use correct macro to disable assert()

The C standard doesn't say anything about DEBUG, just NDEBUG :^)
Andrew Kaster 4 سال پیش
والد
کامیت
6ba87a6b5e
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      Userland/Libraries/LibC/assert.cpp
  2. 1 1
      Userland/Libraries/LibC/assert.h

+ 1 - 1
Userland/Libraries/LibC/assert.cpp

@@ -16,7 +16,7 @@
 extern "C" {
 
 extern bool __stdio_is_initialized;
-#ifdef DEBUG
+#ifndef NDEBUG
 void __assertion_failed(const char* msg)
 {
     dbgln("USERSPACE({}) ASSERTION FAILED: {}", getpid(), msg);

+ 1 - 1
Userland/Libraries/LibC/assert.h

@@ -10,7 +10,7 @@
 
 __BEGIN_DECLS
 
-#ifdef DEBUG
+#ifndef NDEBUG
 __attribute__((noreturn)) void __assertion_failed(const char* msg);
 #    define __stringify_helper(x) #    x
 #    define __stringify(x) __stringify_helper(x)