X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flog.c;h=bcbce64b6115e010059e1788e16070f3f367e63a;hb=9f87c6fe6552ce8b2236a07307d2f825b0e4c439;hp=e25476b673362b58721857a8783e0e8358b13b2d;hpb=49ed04e2e93a6a5b01058638224621d5c07db01c;p=libucw.git diff --git a/lib/log.c b/lib/log.c index e25476b6..bcbce64b 100644 --- a/lib/log.c +++ b/lib/log.c @@ -96,12 +96,20 @@ die(byte *msg, ...) exit(1); } +#ifdef DEBUG void assert_failed(char *assertion, char *file, int line) { log(L_FATAL, "Assertion `%s' failed at %s:%d", assertion, file, line); abort(); } +#else +void +assert_failed(void) +{ + die("Internal error: Assertion failed."); +} +#endif static byte * log_basename(byte *n)