summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-07-02 12:54:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-07-02 12:54:57 (GMT)
commitd4d66c05ba64ebd9ae204c048eebebfd76a095c2 (patch)
tree368c39db89288c324d774cfdfe3c9494dba33bbd /generic/tclObj.c
parent2ee65349c997ec60a0e3def277a24c0f638fed78 (diff)
downloadtcl-d4d66c05ba64ebd9ae204c048eebebfd76a095c2.zip
tcl-d4d66c05ba64ebd9ae204c048eebebfd76a095c2.tar.gz
tcl-d4d66c05ba64ebd9ae204c048eebebfd76a095c2.tar.bz2
Revert refcount changes that were not cosmetic.
Changing equality testing to inequality testing does more than make code prettier or clearer. It makes it less strict, and thus more tolerant of other bugs elsewhere. Such changes deserve separate consideration at least, not breezy entry in an otherwise "code cleanup" commit.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c4
1 files changed, 2 insertions, 2 deletions
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 {