forked from Imagelibrary/binutils-gdb
Remove some unneeded checks in Guile code
The Guile code generally checks to see if an htab is non-null before destroying it. However, the registry code already ensures this, so we can change these checks to asserts and simplify the code a little.
This commit is contained in:
@@ -95,11 +95,9 @@ struct frscm_deleter
|
||||
|
||||
void operator() (htab_t htab)
|
||||
{
|
||||
if (htab != NULL)
|
||||
{
|
||||
htab_traverse_noresize (htab, frscm_mark_frame_invalid, NULL);
|
||||
htab_delete (htab);
|
||||
}
|
||||
gdb_assert (htab != nullptr);
|
||||
htab_traverse_noresize (htab, frscm_mark_frame_invalid, NULL);
|
||||
htab_delete (htab);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user