From: Tilghman Lesher Date: Fri, 4 Sep 2009 17:50:21 +0000 (+0000) Subject: Fix trunk breakage. X-Git-Tag: 11.0.0-beta1~4240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5dfaf5c8b7ca3bfc711a7cd2f6bd87d2ace0b6d8;p=thirdparty%2Fasterisk.git Fix trunk breakage. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216551 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index a4005d7ca2..bfbed1e6f5 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1556,13 +1556,12 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *t, const char *name, { int res; struct ast_lock_track *lt = &t->track; - int canlog = strcmp(filename, "logger.c") & t->tracking; #ifdef HAVE_BKTR struct ast_bt *bt = NULL; #endif - - #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS + int canlog = strcmp(filename, "logger.c") & t->tracking; + if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) { /* Don't warn abount uninitialized lock. * Simple try to initialize it. @@ -1615,13 +1614,12 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *t, const char *name, { int res; struct ast_lock_track *lt= &t->track; - int canlog = strcmp(filename, "logger.c") & t->tracking; #ifdef HAVE_BKTR struct ast_bt *bt = NULL; #endif - - #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS + int canlog = strcmp(filename, "logger.c") & t->tracking; + if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) { /* Don't warn abount uninitialized lock. * Simple try to initialize it.