diff options
author | dgp <dgp@users.sourceforge.net> | 2015-07-02 12:54:57 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-07-02 12:54:57 (GMT) |
commit | d4d66c05ba64ebd9ae204c048eebebfd76a095c2 (patch) | |
tree | 368c39db89288c324d774cfdfe3c9494dba33bbd /generic/tclPreserve.c | |
parent | 2ee65349c997ec60a0e3def277a24c0f638fed78 (diff) | |
download | tcl-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/tclPreserve.c')
-rw-r--r-- | generic/tclPreserve.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |