diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-25 07:05:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-25 07:05:03 +0000 |
commit | 932106f54c35b815756d518b236448b9884d6bde (patch) | |
tree | 1cb7ab000289de706e5813dfe764a2b3644db797 /src/common/util.h | |
parent | 452f4cfa09dffc8f9235c9a9bb1bd3e30aee6aa2 (diff) | |
download | tor-932106f54c35b815756d518b236448b9884d6bde.tar.gz tor-932106f54c35b815756d518b236448b9884d6bde.zip |
Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/common/util.h b/src/common/util.h index 1019b5807d..c80bbd6666 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -39,23 +39,23 @@ #error "Sorry; we don't support building with NDEBUG." #else #ifdef OLD_LOG_INTERFACE -#define tor_assert(expr) do { \ - if (!(expr)) { \ - log(LOG_ERR, "%s:%d: %s: Assertion %s failed; aborting.", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - fprintf(stderr,"%s:%d %s: Assertion %s failed; aborting.\n", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - abort(); /* unreached */ \ - } } while (0) +#define tor_assert(expr) do { \ + if (!(expr)) { \ + log(LOG_ERR, "%s:%d: %s: Assertion %s failed; aborting.", \ + _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ + fprintf(stderr,"%s:%d %s: Assertion %s failed; aborting.\n", \ + _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ + abort(); /* unreached */ \ + } } while (0) #else -#define tor_assert(expr) do { \ - if (!(expr)) { \ - log(LOG_ERR, LD_GENERAL, "%s:%d: %s: Assertion %s failed; aborting.", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - fprintf(stderr,"%s:%d %s: Assertion %s failed; aborting.\n", \ - _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ - abort(); /* unreached */ \ - } } while (0) +#define tor_assert(expr) do { \ + if (!(expr)) { \ + log(LOG_ERR, LD_BUG, "%s:%d: %s: Assertion %s failed; aborting.", \ + _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ + fprintf(stderr,"%s:%d %s: Assertion %s failed; aborting.\n", \ + _SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \ + abort(); /* unreached */ \ + } } while (0) #endif #endif |