diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-18 12:44:22 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-18 12:44:22 (GMT) |
commit | c558898981a43637a64c17a40fd816ae41991961 (patch) | |
tree | f00289fc7ee4cef9794d712add3048d86320a16e /generic/tkWindow.c | |
parent | ec5e2f38d3eb0132822396f9b105d4cc5c78e86b (diff) | |
download | tk-c558898981a43637a64c17a40fd816ae41991961.zip tk-c558898981a43637a64c17a40fd816ae41991961.tar.gz tk-c558898981a43637a64c17a40fd816ae41991961.tar.bz2 |
Change more refCount checks to the form "(...refCount-- <= 1)", so no separate decrement and compare is necessary. This allows (in the future) the same code to work when refCount becomes unsigned (which at least doubles the range). No functional change.
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r-- | generic/tkWindow.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 5855b7c..20b4f20 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -1479,8 +1479,7 @@ Tk_DestroyWindow( winPtr->mainPtr->deletionEpoch++; } - winPtr->mainPtr->refCount--; - if (winPtr->mainPtr->refCount == 0) { + if (winPtr->mainPtr->refCount-- <= 1) { register const TkCmd *cmdPtr; /* |