Omit kutil_openlog if DEBUG not defined or 0
akpoff opened this issue · comments
I was getting errors when the LOGFILE was missing, or DEBUG was undefined or set to 0.
Might be worthwhile moving kutil_openlog down into the other #if statements along with a check for LOGFILE.
$OpenBSD$
Index: kcaldav.c
--- kcaldav.c.orig
+++ kcaldav.c
@@ -313,7 +313,9 @@ main(void)
char *np;
size_t i, sz;
+#if defined LOGFILE && defined DEBUG && DEBUG > 0
kutil_openlog(LOGFILE);
+#endif
st = NULL;
#if defined DEBUG && DEBUG > 1