summaryrefslogtreecommitdiffstats
path: root/srUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'srUtils.h')
-rwxr-xr-xsrUtils.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/srUtils.h b/srUtils.h
index d0d34f37..73109c30 100755
--- a/srUtils.h
+++ b/srUtils.h
@@ -89,14 +89,12 @@ void mutexCancelCleanup(void *arg);
#define LOCK_MUTEX 1
#define DEFVARS_mutexProtection\
int iCancelStateSave; \
- int bLockedOpIsLocked
+ int bLockedOpIsLocked=0
#define BEGIN_MTX_PROTECTED_OPERATIONS(mut, bMustLock) \
if(bMustLock == LOCK_MUTEX) { \
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave); \
d_pthread_mutex_lock(mut); \
bLockedOpIsLocked = 1; \
- } else { \
- bLockedOpIsLocked = 0; \
}
#define END_MTX_PROTECTED_OPERATIONS(mut) \
if(bLockedOpIsLocked) { \