diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-01-19 11:54:02 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-01-19 11:54:02 -0500 |
commit | fa47e4463ab4ee4ddc7858ab11063c7965b232ac (patch) | |
tree | 0061c03a67b96b08855a7b46c42037c9cb32f5bf /gdb/linux-fork.c | |
parent | 6ae3a726d4c5cfa01630663536d0d2cae94b0542 (diff) | |
download | gdb-fa47e4463ab4ee4ddc7858ab11063c7965b232ac.zip gdb-fa47e4463ab4ee4ddc7858ab11063c7965b232ac.tar.gz gdb-fa47e4463ab4ee4ddc7858ab11063c7965b232ac.tar.bz2 |
gdb/linux-fork: simplify one_fork_p
Unless I'm missing something, this function is a complicated way of
saying "fork_list.size () == 1".
gdb/ChangeLog:
* linux-fork.c (one_fork_p): Simplify.
Diffstat (limited to 'gdb/linux-fork.c')
-rw-r--r-- | gdb/linux-fork.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c index 284f198..3571886 100644 --- a/gdb/linux-fork.c +++ b/gdb/linux-fork.c @@ -110,8 +110,7 @@ find_last_fork (void) static bool one_fork_p () { - return (!fork_list.empty () - && &fork_list.front () == &fork_list.back ()); + return fork_list.size () == 1; } /* Add a new fork to the internal fork list. */ |