From: Tobias Oetiker Date: Wed, 4 Jan 2017 16:15:07 +0000 (+0100) Subject: DEBUG should not be active and libraries should not exit anyway ... fix for #760 X-Git-Tag: v1.7.0~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e5122243919fcf7f885d775bf7e20155eeec73ab;p=thirdparty%2Frrdtool-1.x.git DEBUG should not be active and libraries should not exit anyway ... fix for #760 --- diff --git a/src/rrd_open.c b/src/rrd_open.c index 91b8e84f..c1a49c98 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -43,7 +43,7 @@ #endif /* DEBUG 2 prints information obtained via mincore(2) */ -#define DEBUG 1 +#define DEBUG 0 /* do not calculate exact madvise hints but assume 1 page for headers and * set DONTNEED for the rest, which is assumed to be data */ /* Avoid calling madvise on areas that were already hinted. May be beneficial if @@ -189,7 +189,8 @@ rrd_file_t *rrd_open( (RRD_READONLY | RRD_READWRITE)) { /* Both READONLY and READWRITE were given, which is invalid. */ rrd_set_error("in read/write request mask"); - exit(-1); + free(rrd_file); + return NULL; } #endif