Do not evaluate strings as booleans

This commit is contained in:
John Wiegley 2012-02-10 19:58:06 -10:00
parent 9d1daa27e2
commit 5e3e204766
4 changed files with 5 additions and 5 deletions

View file

@ -366,7 +366,7 @@ value_t expr_t::op_t::calc(scope_t& scope, ptr_op_t * locus, const int depth)
break; break;
case O_COLON: case O_COLON:
assert(! "We should never calculate an O_COLON operator"); assert("We should never calculate an O_COLON operator" == NULL);
break; break;
case O_CONS: case O_CONS:

View file

@ -558,7 +558,7 @@ std::size_t post_t::xact_id() const
return id; return id;
id++; id++;
} }
assert(! "Failed to find posting within its transaction"); assert("Failed to find posting within its transaction" == NULL);
return 0; return 0;
} }
@ -570,7 +570,7 @@ std::size_t post_t::account_id() const
return id; return id;
id++; id++;
} }
assert(! "Failed to find posting within its transaction"); assert("Failed to find posting within its transaction" == NULL);
return 0; return 0;
} }

View file

@ -783,7 +783,7 @@ void instance_t::master_account_directive(char * line)
context.state_stack.push_front(acct); context.state_stack.push_front(acct);
#if !defined(NO_ASSERTS) #if !defined(NO_ASSERTS)
else else
assert(! "Failed to create account"); assert("Failed to create account" == NULL);
#endif #endif
} }

View file

@ -189,7 +189,7 @@ static void trace_delete_func(void * ptr, const char * which)
if (i == live_memory->end()) { if (i == live_memory->end()) {
i = freed_memory->find(ptr); i = freed_memory->find(ptr);
if (i != freed_memory->end()) if (i != freed_memory->end())
VERIFY(! "Freeing a block of memory twice"); VERIFY("Freeing a block of memory twice" == NULL);
#if 0 #if 0
// There can be memory allocated by Boost or the standard library, which // There can be memory allocated by Boost or the standard library, which
// was allocated before memory tracing got turned on, that the system // was allocated before memory tracing got turned on, that the system