From 8a1b979bf9034968de41289abf6d7769fdceed33 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 27 Nov 2006 14:09:32 +0000 Subject: [PATCH] Test differently for overflow in log bits --- src/log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/log.c b/src/log.c index d834bac..e7ec51f 100644 --- a/src/log.c +++ b/src/log.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: log.c,v 1.42 2006-10-09 11:21:37 adam Exp $ + * $Id: log.c,v 1.43 2006-11-27 14:09:32 adam Exp $ */ /** @@ -528,7 +528,7 @@ static int define_module_bit(const char *name) nmem_mutex_leave(log_mutex); return mask_names[i].mask; } - if ( (i>=MAX_MASK_NAMES) || (next_log_bit >= 1<<31 )) + if ( (i>=MAX_MASK_NAMES) || (next_log_bit & (1<<31) )) { nmem_mutex_leave(log_mutex); yaz_log(YLOG_WARN, "No more log bits left, not logging '%s'", name); -- 1.7.10.4