From: Adam Dickmeiss Date: Mon, 27 Nov 2006 14:09:32 +0000 (+0000) Subject: Test differently for overflow in log bits X-Git-Tag: YAZ.2.1.40~1 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=8a1b979bf9034968de41289abf6d7769fdceed33 Test differently for overflow in log bits --- 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);