[hackers] [scc] [libc] Fix definition of assert || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 4 Aug 2016 16:18:06 +0200 (CEST)

commit e24d97ecad8360e6d457bbfcd4d60157bd306068
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Aug 4 16:14:17 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Aug 4 16:14:17 2016 +0200

    [libc] Fix definition of assert
    
    __assert() needs the value of the expression or it will not
    be able to determine is the assert was correct or not :P

diff --git a/libc/include/z80/assert.h b/libc/include/z80/assert.h
index 339c7aa..1d9eadb 100644
--- a/libc/include/z80/assert.h
+++ b/libc/include/z80/assert.h
_AT_@ -3,7 +3,7 @@
 #define _ASSERT_H
 
 #ifndef NDEBUG
-#define assert(exp) __assert(#exp, __FILE__, __LINE__)
+#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__)
 #endif
 
 #endif
Received on Thu Aug 04 2016 - 16:18:06 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 04 2016 - 16:24:16 CEST