summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-16 16:14:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-16 16:14:57 (GMT)
commit43b22f924faa4963e0238f2191f56270c8d90b81 (patch)
tree7ca9a2e61706cb9fa91e227c8a5154e4c9551ce7 /generic/tclClock.c
parent028b343b32bc4726f0105e37806be745bdabfd67 (diff)
downloadtcl-43b22f924faa4963e0238f2191f56270c8d90b81.zip
tcl-43b22f924faa4963e0238f2191f56270c8d90b81.tar.gz
tcl-43b22f924faa4963e0238f2191f56270c8d90b81.tar.bz2
Some more internal use of size_t in stead of int. No functional change.
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index c3b29e9..27009fd 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -92,7 +92,7 @@ static const char *const literals[] = {
*/
typedef struct ClockClientData {
- int refCount; /* Number of live references. */
+ size_t refCount; /* Number of live references. */
Tcl_Obj **literals; /* Pool of object literals. */
} ClockClientData;
@@ -2060,8 +2060,7 @@ ClockDeleteCmdProc(
ClockClientData *data = clientData;
int i;
- data->refCount--;
- if (data->refCount == 0) {
+ if (data->refCount-- <= 1) {
for (i = 0; i < LIT__END; ++i) {
Tcl_DecrRefCount(data->literals[i]);
}