use explicit returns to avoid checker confusion
authorTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:30:03 +0000 (17:30 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:30:03 +0000 (17:30 +0000)
commitf3300387104722cbfcfc955bdacb474c7f33ba9e
tree3f393ef58f81481da206005d7471b2a46cf1b44d
parentc27e16e3f1dcf904e09c4d725bc6dbde7e9ef172
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.
gdb/ChangeLog
gdb/python/py-breakpoint.c
gdb/python/py-frame.c
gdb/python/python.c