* reggroups.c (reggroup_next): Check for the final entry.
+2003-08-05 Andrew Cagney <cagney@redhat.com>
+
+ * reggroups.c (reggroup_next): Check for the final entry.
+
2003-08-04 Andrew Cagney <cagney@redhat.com>
* monitor.h (monitor_dump_reg_block): Remove ATTR_FORMAT.
if (groups->first == NULL)
groups = &default_groups;
- /* Retun the first/next reggroup. */
+ /* Return the first/next reggroup. */
if (last == NULL)
return groups->first->group;
for (el = groups->first; el != NULL; el = el->next)
{
if (el->group == last)
- return el->next->group;
+ {
+ if (el->next != NULL)
+ return el->next->group;
+ else
+ return NULL;
+ }
}
return NULL;
}