summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompile.c2
-rw-r--r--generic/tclNamesp.c2
-rw-r--r--generic/tclObj.c4
-rw-r--r--generic/tclPreserve.c4
-rw-r--r--generic/tclProc.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index b9aee64..361c26f 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1117,7 +1117,7 @@ TclCleanupByteCode(
}
}
- if (codePtr->localCachePtr && (codePtr->localCachePtr->refCount-- <= 1)) {
+ if (codePtr->localCachePtr && (--codePtr->localCachePtr->refCount == 0)) {
TclFreeLocalCache(interp, codePtr->localCachePtr);
}
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 3231ce6..91239f0 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -402,7 +402,7 @@ Tcl_PopCallFrame(
}
if (framePtr->numCompiledLocals > 0) {
TclDeleteCompiledLocalVars(iPtr, framePtr);
- if (framePtr->localCachePtr->refCount-- <= 1) {
+ if (--framePtr->localCachePtr->refCount == 0) {
TclFreeLocalCache(interp, framePtr->localCachePtr);
}
framePtr->localCachePtr = NULL;
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 15d874f..f9216b3 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4288,7 +4288,7 @@ FreeCmdNameInternalRep(
* there are no more uses, free the ResolvedCmdName structure.
*/
- if (resPtr->refCount-- <= 1) {
+ if (resPtr->refCount-- == 1) {
/*
* Now free the cached command, unless it is still in its hash
* table or if there are other references to it from other cmdName
@@ -4404,7 +4404,7 @@ SetCmdNameFromAny(
Command *oldCmdPtr = resPtr->cmdPtr;
- if (oldCmdPtr->refCount-- <= 1) {
+ if (--oldCmdPtr->refCount == 0) {
TclCleanupCommandMacro(oldCmdPtr);
}
} else {
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 0b33d22..cca13e8 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -195,7 +195,7 @@ Tcl_Release(
continue;
}
- if (refPtr->refCount-- > 1) {
+ if (--refPtr->refCount != 0) {
Tcl_MutexUnlock(&preserveMutex);
return;
}
@@ -459,7 +459,7 @@ TclHandleRelease(
handlePtr, handlePtr->ptr2, handlePtr->ptr);
}
#endif
- if ((handlePtr->refCount-- <= 1) && (handlePtr->ptr == NULL)) {
+ if ((--handlePtr->refCount == 0) && (handlePtr->ptr == NULL)) {
ckfree(handlePtr);
}
}
diff --git a/generic/tclProc.c b/generic/tclProc.c
index a9705eb..7bf63c2 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -2445,7 +2445,7 @@ FreeLambdaInternalRep(
Proc *procPtr = objPtr->internalRep.twoPtrValue.ptr1;
Tcl_Obj *nsObjPtr = objPtr->internalRep.twoPtrValue.ptr2;
- if (procPtr->refCount-- <= 1) {
+ if (procPtr->refCount-- == 1) {
TclProcCleanupProc(procPtr);
}
TclDecrRefCount(nsObjPtr);