btrfs-progs: kerncompat: call abort at the end of assert_trace
authorDavid Sterba <dsterba@suse.com>
Tue, 4 Oct 2016 17:02:37 +0000 (19:02 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 5 Oct 2016 10:39:01 +0000 (12:39 +0200)
The assert* helpers should not exit normally, mimick the behaviour of
the std library assert.

Signed-off-by: David Sterba <dsterba@suse.com>
kerncompat.h

index 26d3cb7..0cd85dc 100644 (file)
@@ -91,6 +91,7 @@ static inline void assert_trace(const char *assertion, const char *filename,
                fprintf(stderr, "%s:%d: %s: Assertion failed, value %d.\n",
                        filename, line, func, val);
        print_trace();
+       abort();
        exit(1);
 }