mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-19 00:49:47 +08:00
use explicit returns to avoid checker confusion
The checker does not understand the idiom if (except.reason < 0) { do_cleanups (whatever); GDB_PY_HANDLE_EXCEPTION (except); } because it doesn't realize that the nested 'if' actually has the same condition. This fixes instances of this to be more explicit. * python/py-breakpoint.c (bppy_get_commands): Use explicit, unconditional return. * python/py-frame.c (frapy_read_var): Likewise. * python/python.c (gdbpy_decode_line): Likewise.
This commit is contained in:
@ -477,7 +477,8 @@ frapy_read_var (PyObject *self, PyObject *args)
|
||||
if (except.reason < 0)
|
||||
{
|
||||
do_cleanups (cleanup);
|
||||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
gdbpy_convert_exception (except);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!var)
|
||||
|
Reference in New Issue
Block a user