diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 07:28:01 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 07:28:01 +0000 |
commit | bccc6a110e3c488cd1b4adfba279435fc7521dc1 (patch) | |
tree | b95fb2b82fb1b238ad44ed9ac2a50231b2466777 /res | |
parent | 8b63a317f7370392429f3173db3df90cda2b0c5a (diff) |
remove a check of the result of ast_mutex_lock
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25891 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_monitor.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index c5c8102a0..4f47a6512 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -50,22 +50,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") AST_MUTEX_DEFINE_STATIC(monitorlock); -#define LOCK_IF_NEEDED(lock, needed) \ - do { \ - if (needed) { \ - if (ast_mutex_lock(lock)) { \ - ast_log(LOG_WARNING, "Unable to lock channel\n"); \ - return -1; \ - } \ - } \ +#define LOCK_IF_NEEDED(lock, needed) do { \ + if (needed) \ + ast_mutex_lock(lock); \ } while(0) -#define UNLOCK_IF_NEEDED(lock, needed) \ - do { \ - if (needed) { \ - ast_mutex_unlock(lock); \ - } \ - } while(0) \ +#define UNLOCK_IF_NEEDED(lock, needed) do { \ + if (needed) \ + ast_mutex_unlock(lock); \ + } while (0) static unsigned long seq = 0; |