summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2002-02-03 22:33:07 (GMT)
committerericm <ericm>2002-02-03 22:33:07 (GMT)
commitc4c221ed212e46e8248635e96a58dc801e106668 (patch)
treec697e2403242e08d3ba676a87bd2a3959e70ef41
parent4ad7f3e495e1d3885d7661ae4cc2ec6cab981bf2 (diff)
downloadtk-c4c221ed212e46e8248635e96a58dc801e106668.zip
tk-c4c221ed212e46e8248635e96a58dc801e106668.tar.gz
tk-c4c221ed212e46e8248635e96a58dc801e106668.tar.bz2
Clean-up bogus for loop in [image inuse] subcommand. [Bug #485803]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkImage.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a83131..908f297 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-03 eric melski <ericm@interwoven.com>
+
+ * generic/tkImage.c (Tk_ImageObjCmd): Clean up bogus for loop in
+ [image inuse] subcommand [Bug #485803].
+
2002-02-01 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tkCmds.c (Tk_TkObjCmd): don't use 'bool' as an arg as it
diff --git a/generic/tkImage.c b/generic/tkImage.c
index bdd6cc7..38275a8 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImage.c,v 1.13 2002/01/17 05:13:11 dgp Exp $
+ * RCS: @(#) $Id: tkImage.c,v 1.14 2002/02/03 22:33:07 ericm Exp $
*/
#include "tkInt.h"
@@ -368,12 +368,8 @@ Tk_ImageObjCmd(clientData, interp, objc, objv)
return TCL_ERROR;
}
masterPtr = (ImageMaster *) Tcl_GetHashValue(hPtr);
- if (masterPtr->typePtr != NULL) {
- for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
- imagePtr = imagePtr->nextPtr) {
- count = 1;
- break;
- }
+ if (masterPtr->typePtr != NULL && masterPtr->instancePtr != NULL) {
+ count = 1;
}
Tcl_SetBooleanObj(Tcl_GetObjResult(interp), count);
break;