summaryrefslogtreecommitdiffstats
path: root/win/tkWinWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinWm.c')
-rw-r--r--win/tkWinWm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index 017cba9..768ee69 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -148,7 +148,7 @@ typedef struct {
*/
typedef struct WinIconInstance {
- int refCount; /* Number of instances that share this data
+ size_t refCount; /* Number of instances that share this data
* structure. */
BlockOfIconImagesPtr iconBlock;
/* Pointer to icon resource data for image */
@@ -1421,9 +1421,7 @@ static void
DecrIconRefCount(
WinIconPtr titlebaricon)
{
- titlebaricon->refCount--;
-
- if (titlebaricon->refCount <= 0) {
+ if (titlebaricon->refCount-- <= 1) {
if (titlebaricon->iconBlock != NULL) {
FreeIconBlock(titlebaricon->iconBlock);
}
@@ -5730,7 +5728,7 @@ WmWaitVisibilityOrMapProc(
* This function is invoked by a widget when it wishes to set a grid
* coordinate system that controls the size of a top-level window. It
* provides a C interface equivalent to the "wm grid" command and is
- * usually asscoiated with the -setgrid option.
+ * usually associated with the -setgrid option.
*
* Results:
* None.