]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: use skip_spaces in info_linker_namespace_command
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 11 Jul 2025 17:22:23 +0000 (13:22 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 22 Jul 2025 17:42:18 +0000 (13:42 -0400)
Change-Id: I02c7daed3740e319ee27d3512a2b941f666b103b
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/solib.c

index 82217856517e7f6b5e5717beeda6b404b8a7a58e..bd9f3cb4dff4664d2a48bcd615fe318ac67aa08b 100644 (file)
@@ -1167,9 +1167,7 @@ info_linker_namespace_command (const char *pattern, int from_tty)
   struct ui_out *uiout = current_uiout;
   std::vector<std::pair<int, std::vector<const solib *>>> all_solibs_to_print;
 
-  if (pattern != nullptr)
-    while (*pattern == ' ')
-      pattern++;
+  pattern = skip_spaces (pattern);
 
   if (pattern == nullptr || pattern[0] == '\0')
     {