btrfs-progs: kerncompat: simplify warning_trace
The value of assertion is always set. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
bc2d4ccc46
commit
6b62b76470
11
kerncompat.h
11
kerncompat.h
|
@ -93,14 +93,9 @@ static inline void warning_trace(const char *assertion, const char *filename,
|
|||
{
|
||||
if (!val)
|
||||
return;
|
||||
if (assertion)
|
||||
fprintf(stderr,
|
||||
"%s:%d: %s: Warning: assertion `%s` failed, value %ld\n",
|
||||
filename, line, func, assertion, val);
|
||||
else
|
||||
fprintf(stderr,
|
||||
"%s:%d: %s: Warning: assertion failed, value %ld.\n",
|
||||
filename, line, func, val);
|
||||
fprintf(stderr,
|
||||
"%s:%d: %s: Warning: assertion `%s` failed, value %ld\n",
|
||||
filename, line, func, assertion, val);
|
||||
#ifndef BTRFS_DISABLE_BACKTRACE
|
||||
print_trace();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue