btrfs-progs: kerncompat: disconnect assert and warning messages

The assertion and warn/bug have reversed condition checks, using the
same helpers drops the exact value, so we'll print the message directly
without the helpers.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2017-01-24 16:02:44 +01:00
parent eb6e3d6518
commit bc2d4ccc46
1 changed files with 3 additions and 1 deletions

View File

@ -301,7 +301,9 @@ static inline void assert_trace(const char *assertion, const char *filename,
{
if (val)
return;
warning_trace(assertion, filename, func, line, val);
fprintf(stderr,
"%s:%d: %s: Assertion `%s` failed, value %ld\n",
filename, line, func, assertion, val);
abort();
exit(1);
}