summaryrefslogtreecommitdiff
path: root/src/assert/__assert.c
blob: 22b6108c40e72dc46185f30cd3caf21005a347d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include <stdlib.h>

void __assert(const char *expr, const char *file, int line, const char *func)
{
        if (func) {
                fprintf(stderr, "Assertion failed: %s (%s:%d:%s())\n", expr,
                        file, line, func);
        } else {
                fprintf(stderr, "Assertion failed: %s (%s:%d)\n", expr, file,
                        line);
        }
        abort();
}