From: Tom Tromey Date: Fri, 27 Apr 2018 22:04:13 +0000 (-0600) Subject: Minor cleanups in printcmd.c X-Git-Tag: users/gbenson/thread_db-test/2018-05-23~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f433492bd9dd3af10aab8d92dc0bfbf8ff6c5e8;p=thirdparty%2Fbinutils-gdb.git Minor cleanups in printcmd.c This changes decode_format to use skip_spaces, and changes printcmd.c not to include tui.h, which apparently is not needed. 2018-05-04 Tom Tromey * printcmd.c: Don't include tui.h. (decode_format): Use skip_spaces. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7136be6690c..b5e1f6e2f26 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-05-04 Tom Tromey + + * printcmd.c: Don't include tui.h. + (decode_format): Use skip_spaces. + 2018-05-04 Tom Tromey PR gdb/22619: diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 18c41103bd5..4696373b2cc 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -50,10 +50,6 @@ #include "source.h" #include "common/byte-vector.h" -#ifdef TUI -#include "tui/tui.h" /* For tui_active et al. */ -#endif - /* Last specified output format. */ static char last_format = 0; @@ -215,9 +211,7 @@ decode_format (const char **string_ptr, int oformat, int osize) break; } - while (*p == ' ' || *p == '\t') - p++; - *string_ptr = p; + *string_ptr = skip_spaces (p); /* Set defaults for format and size if not specified. */ if (val.format == '?')