diff options
author | ajs <ajs> | 2004-11-24 17:14:49 +0000 |
---|---|---|
committer | ajs <ajs> | 2004-11-24 17:14:49 +0000 |
commit | c2c9cd9cb588a6a64e88f22ff6a7fe64e90e4991 (patch) | |
tree | fb2e91dd75e9191df27323ef432b065340372ca4 /lib/log.c | |
parent | df2b054cda7d7a16ec4aca32e97e319ab848c6b5 (diff) | |
download | quagga-c2c9cd9cb588a6a64e88f22ff6a7fe64e90e4991.tar.bz2 quagga-c2c9cd9cb588a6a64e88f22ff6a7fe64e90e4991.tar.xz |
2004-11-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* zassert.h: New header file to declare a quagga-specific assert macro.
* log.c: (_zlog_assert_failed) New function called when assert fails
to log the error and abort.
* zebra.h: Include "zassert.h" instead of <assert.h>.
* regex.c: Include "zassert.h" instead of <assert.h>.
* dict.c: Include "zassert.h" instead of <assert.h>.
Diffstat (limited to 'lib/log.c')
-rw-r--r-- | lib/log.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -315,6 +315,15 @@ PLOG_FUNC(plog_debug, LOG_DEBUG) #undef PLOG_FUNC +void +_zlog_assert_failed (const char *assertion, const char *file, + unsigned int line, const char *function) +{ + zlog_err("Assertion `%s' failed in file %s, line %u, function %s", + assertion,file,line,(function ? function : "?")); + abort(); +} + /* Open log stream */ struct zlog * |