summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/__assert.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-09 16:37:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-01-09 16:37:40 +0000
commit29ab6a0ea082de76f355bd3f489fbec6f1932882 (patch)
tree21a40549e226eb93ae17ad6f6c90b3004721dc4d /cpukit/libcsupport/src/__assert.c
parent2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-29ab6a0ea082de76f355bd3f489fbec6f1932882.tar.bz2
2008-01-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/__assert.c: Clean up and make __assert() call __assert_func().
Diffstat (limited to 'cpukit/libcsupport/src/__assert.c')
-rw-r--r--cpukit/libcsupport/src/__assert.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c
index 3a93d32ed7..040a76be13 100644
--- a/cpukit/libcsupport/src/__assert.c
+++ b/cpukit/libcsupport/src/__assert.c
@@ -17,23 +17,10 @@
#include <rtems/bspIo.h>
#include <rtems.h>
-void __assert(
- const char *file,
- int line,
-
-const char *failedexpr)
-{
- printk(
- "assertion \"%s\" failed: file \"%s\", line %d\n",
- failedexpr,
- file,
- line
- );
- rtems_fatal_error_occurred(0);
-}
/*
- * Newlib 1.16.0 added this method
+ * Newlib 1.16.0 added this method. Together these provide an
+ * RTEMS safe, low memory implementation.
*/
void __assert_func(
const char *file,
@@ -46,7 +33,17 @@ void __assert_func(
failedexpr,
file,
line,
- func ? ", function: " : "", func ? func : ""
+ (func) ? ", function: " : "",
+ (func) ? func : ""
);
rtems_fatal_error_occurred(0);
}
+
+void __assert(
+ const char *file,
+ int line,
+ const char *failedexpr
+)
+{
+ __assert_func (file, line, NULL, failedexpr);
+}