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.
This commit is contained in:
Simon Marchi 2020-01-19 11:54:02 -05:00
parent 6ae3a726d4
commit fa47e4463a
2 changed files with 5 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2020-01-19 Simon Marchi <simon.marchi@polymtl.ca>
* linux-fork.c (one_fork_p): Simplify.
2020-01-17 Simon Marchi <simon.marchi@efficios.com>
* top.c (struct qt_args): Remove.

View File

@ -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. */