]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: remove an unnecessary scope block in update_breakpoint_locations
authorAndrew Burgess <aburgess@redhat.com>
Tue, 5 Nov 2024 13:42:57 +0000 (13:42 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 25 Nov 2024 16:45:25 +0000 (16:45 +0000)
commitdf63932c96a393a1211cb2bcec19349db84a9c18
tree10ed0d591c64b2d622a34870d45897ff5624060f
parent2778a124e30439c1801d3d19a47d8233935051af
gdb: remove an unnecessary scope block in update_breakpoint_locations

In update_breakpoint_locations there's a scope block which I don't
think adds any value.  There is one local defined within the scope,
the local is currently an 'int' but should be a 'bool', either way
there's no destructor being triggered when we exit the scope.

This commit changes the local to a 'bool', removes the unnecessary
scope, and re-indents the code.

Within the (now removed) scope was a `for' loop.  Inside the loop I
have converted this:

  for (....)
    {
      if (CONDITION)
        {
          /* Body */
        }
    }

to this:

  for (....)
    {
      if (!CONDITION)
        continue;

      /* Body */
    }

which means that the body doesn't need to be indented as much, making
things easier to read.

There should be no functional change after this commit.

Reviewed-By: Klaus Gerlicher <klaus.gerlicher@intel.com>
gdb/breakpoint.c