[v2,04/24] Make check_for_argument skip whitespace after arg itself

Message ID 654f7363-6bfd-0db5-8b48-ec8b47888304@redhat.com
State New, archived
Headers

Commit Message

Pedro Alves June 4, 2019, 10:21 p.m. UTC
  On 6/3/19 7:49 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> Basically every caller of check_for_argument needs to skip space after
> Pedro> the argument.  This patch makes check_for_argument do it itself.
> 
> Pedro> Suggested by Philippe Waroquiers
> 
> Philippe's recent help-styling series added a new instance of this, so
> whoever lands their series last ought to be sure to go fix that up.

His series is in, so I made this change:

Thanks,
Pedro Alves
  

Patch

diff --git i/gdb/cli/cli-cmds.c w/gdb/cli/cli-cmds.c
index 09f932c2d21..4e33e3e3b72 100644
--- i/gdb/cli/cli-cmds.c
+++ w/gdb/cli/cli-cmds.c
@@ -1381,9 +1381,6 @@  apropos_command (const char *arg, int from_tty)
 {
   bool verbose = arg && check_for_argument (&arg, "-v", 2);
 
-  if (verbose)
-    arg = skip_spaces (arg);
-
   if (arg == NULL || *arg == '\0')
     error (_("REGEXP string is empty"));