]> mj.ucw.cz Git - netgrind.git/blob - lib/assert.c
Fixed WALK_LIST.
[netgrind.git] / lib / assert.c
1 /*
2  *      Sherlock Library -- Assertions
3  *
4  *      (c) 2003 Martin Mares <mj@ucw.cz>
5  *
6  *      This software may be freely distributed and used according to the terms
7  *      of the GNU Lesser General Public License.
8  */
9
10 #include "lib/lib.h"
11
12 #include <stdlib.h>
13
14 #ifdef DEBUG
15 void
16 assert_failed(char *assertion, char *file, int line)
17 {
18   die("Assertion `%s' failed at %s:%d", assertion, file, line);
19   abort();
20 }
21 #else
22 void
23 assert_failed(void)
24 {
25   die("Internal error: Assertion failed.");
26 }
27 #endif