* mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
* varobj.c (varobj_invalidate): Replace a while loop by for loop.
+2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
+ * varobj.c (varobj_invalidate): Replace a while loop by for loop.
+
2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
Fix hang in floating varobjs.
do_cleanups (cleanup);
return;
}
- cr = rootlist;
- while (*cr != NULL)
+ for (cr = rootlist; *cr != NULL; cr++)
{
int thread_id = varobj_get_thread_id (*cr);
int thread_stopped = 0;
if (thread_stopped)
if (*name == '*' || varobj_floating_p (*cr))
varobj_update_one (*cr, print_values, 0 /* implicit */);
- cr++;
}
do_cleanups (cleanup);
}
if (varobj_list (&all_rootvarobj) > 0)
{
- varp = all_rootvarobj;
- while (*varp != NULL)
+ for (varp = all_rootvarobj; *varp != NULL; varp++)
{
/* Floating varobjs are reparsed on each stop, so we don't care if
the presently parsed expression refers to something that's gone.
*/
- if ((*varp)->root->floating) {
- varp++;
+ if ((*varp)->root->floating)
continue;
- }
/* global var must be re-evaluated. */
if ((*varp)->root->valid_block == NULL)
}
else /* locals must be invalidated. */
(*varp)->root->is_valid = 0;
-
- varp++;
}
}
xfree (all_rootvarobj);