From 0a4eb210f776132be8f6e421bf950516d3693f69 Mon Sep 17 00:00:00 2001 From: crunchy Date: Wed, 19 Mar 2003 16:41:57 +0000 Subject: fixed a bug in debug.c -- uninitialed __debug_fd --- libmpio/debug.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libmpio/debug.c b/libmpio/debug.c index 2de85eb..2596e9d 100644 --- a/libmpio/debug.c +++ b/libmpio/debug.c @@ -4,7 +4,7 @@ * Authors: Dirk Meyer * Andreas Büsching * - * $Id: debug.c,v 1.1 2002/08/28 16:10:51 salmoon Exp $ + * $Id: debug.c,v 1.2 2003/03/19 16:41:57 crunchy Exp $ */ #include "debug.h" @@ -22,7 +22,7 @@ char *__debug_color = NULL; int __debug_level = 0; -FILE *__debug_fd; +FILE *__debug_fd = NULL; void debug_init(void) { @@ -277,7 +277,8 @@ int _use_debug(int level) { if (__debug_level == -1) return 0; - + if (__debug_fd == NULL) return 0; + if (level <= __debug_level) { return 1; } -- cgit v1.2.3