summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-22 03:09:55 (GMT)
committerhobbs <hobbs>1999-12-22 03:09:55 (GMT)
commitdf22b32b46d606463bff122495f98a30bdccb659 (patch)
treeb572c470e4c59a3a28b5a08e69bd4ad859e3b322 /generic/tkCanvas.c
parent80a44daf8ff70d7dbe09fb79c7765fd2509f0d9d (diff)
downloadtk-df22b32b46d606463bff122495f98a30bdccb659.zip
tk-df22b32b46d606463bff122495f98a30bdccb659.tar.gz
tk-df22b32b46d606463bff122495f98a30bdccb659.tar.bz2
fix for mac happiness
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 0446d0c..76e3da5 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.9 1999/12/14 06:52:26 hobbs Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.10 1999/12/22 03:09:55 hobbs Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -726,13 +726,14 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
TagSearchExpr *expr, **lastPtr;
lastPtr = &(canvasPtr->bindTagExprs);
- while ((expr = *lastPtr)) {
- if (expr->uid == searchPtr->expr->uid)
+ while ((expr = *lastPtr) != NULL) {
+ if (expr->uid == searchPtr->expr->uid) {
break;
- lastPtr = &(expr->next);
}
+ lastPtr = &(expr->next);
+ }
if (!expr) {
- /*
+ /*
* transfer ownership of expr to bindTagExprs list
*/
*lastPtr = searchPtr->expr;
@@ -741,8 +742,8 @@ CanvasWidgetCmd(clientData, interp, argc, argv)
/*
* flag in TagSearch that expr has changed ownership
* so that TagSearchDestroy doesn't try to free it
- */
- searchPtr->expr = NULL;
+ */
+ searchPtr->expr = NULL;
}
}
#endif /* not USE_OLD_TAG_SEARCH */
@@ -4898,7 +4899,8 @@ CanvasDoEvent(canvasPtr, eventPtr)
expr = canvasPtr->bindTagExprs;
while (expr) {
expr->index = 0;
- if ((expr->match = TagSearchEvalExpr(expr, itemPtr))) {
+ expr->match = TagSearchEvalExpr(expr, itemPtr);
+ if (expr->match) {
numExprs++;
}
expr = expr->next;