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)
|
if (!val)
|
||||||
return;
|
return;
|
||||||
if (assertion)
|
fprintf(stderr,
|
||||||
fprintf(stderr,
|
"%s:%d: %s: Warning: assertion `%s` failed, value %ld\n",
|
||||||
"%s:%d: %s: Warning: assertion `%s` failed, value %ld\n",
|
filename, line, func, assertion, val);
|
||||||
filename, line, func, assertion, val);
|
|
||||||
else
|
|
||||||
fprintf(stderr,
|
|
||||||
"%s:%d: %s: Warning: assertion failed, value %ld.\n",
|
|
||||||
filename, line, func, val);
|
|
||||||
#ifndef BTRFS_DISABLE_BACKTRACE
|
#ifndef BTRFS_DISABLE_BACKTRACE
|
||||||
print_trace();
|
print_trace();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue