diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-10 19:58:06 -1000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-11 16:53:31 -1000 |
commit | 5e3e204766bc5ce0f6335d12de0c4f0f03f20d00 (patch) | |
tree | f5ee338785fb57ab604f267b95370a7539901ad6 | |
parent | 9d1daa27e23864e0238c8fde2b6ad5f45ebe136a (diff) | |
download | fork-ledger-5e3e204766bc5ce0f6335d12de0c4f0f03f20d00.tar.gz fork-ledger-5e3e204766bc5ce0f6335d12de0c4f0f03f20d00.tar.bz2 fork-ledger-5e3e204766bc5ce0f6335d12de0c4f0f03f20d00.zip |
Do not evaluate strings as booleans
-rw-r--r-- | src/op.cc | 2 | ||||
-rw-r--r-- | src/post.cc | 4 | ||||
-rw-r--r-- | src/textual.cc | 2 | ||||
-rw-r--r-- | src/utils.cc | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -366,7 +366,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth) break; case O_COLON: - assert(! "We should never calculate an O_COLON operator"); + assert("We should never calculate an O_COLON operator" == NULL); break; case O_CONS: diff --git a/src/post.cc b/src/post.cc index 4178c8bc..862460df 100644 --- a/src/post.cc +++ b/src/post.cc @@ -558,7 +558,7 @@ std::size_t post_t::xact_id() const return id; id++; } - assert(! "Failed to find posting within its transaction"); + assert("Failed to find posting within its transaction" == NULL); return 0; } @@ -570,7 +570,7 @@ std::size_t post_t::account_id() const return id; id++; } - assert(! "Failed to find posting within its transaction"); + assert("Failed to find posting within its transaction" == NULL); return 0; } diff --git a/src/textual.cc b/src/textual.cc index 341271b6..42845e3a 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -783,7 +783,7 @@ void instance_t::master_account_directive(char * line) context.state_stack.push_front(acct); #if !defined(NO_ASSERTS) else - assert(! "Failed to create account"); + assert("Failed to create account" == NULL); #endif } diff --git a/src/utils.cc b/src/utils.cc index 0cfe9e90..42600db3 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -189,7 +189,7 @@ static void trace_delete_func(void * ptr, const char * which) if (i == live_memory->end()) { i = freed_memory->find(ptr); if (i != freed_memory->end()) - VERIFY(! "Freeing a block of memory twice"); + VERIFY("Freeing a block of memory twice" == NULL); #if 0 // There can be memory allocated by Boost or the standard library, which // was allocated before memory tracing got turned on, that the system |