diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-12-14 14:17:44 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-12-15 12:12:08 +0000 |
commit | 53cf95c3389a3ecd97276d322e4a60fe3396a201 (patch) | |
tree | 3cb108e13d3035ddfcecc985b1d37eed263bc286 /gdb/target-connection.c | |
parent | c91a13e4e6790324e2177fa4b98e4637e3b03f97 (diff) | |
download | gdb-53cf95c3389a3ecd97276d322e4a60fe3396a201.zip gdb-53cf95c3389a3ecd97276d322e4a60fe3396a201.tar.gz gdb-53cf95c3389a3ecd97276d322e4a60fe3396a201.tar.bz2 |
gdb: make more use of make_target_connection_string
I noticed that we have a function make_target_connection_string which
wraps all the logic for creating a string that describes a target
connection - but in some places we are not calling this function,
instead we duplicate the function's logic.
This commit cleans this up, and calls make_target_connection_string
where possible.
There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/target-connection.c')
-rw-r--r-- | gdb/target-connection.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/target-connection.c b/gdb/target-connection.c index d1da6a2..d88b9c8 100644 --- a/gdb/target-connection.c +++ b/gdb/target-connection.c @@ -91,10 +91,7 @@ print_connection (struct ui_out *uiout, const char *requested_connections) process_stratum_target *t = it.second; - size_t l = strlen (t->shortname ()); - if (t->connection_string () != NULL) - l += 1 + strlen (t->connection_string ()); - + size_t l = strlen (make_target_connection_string (t).c_str ()); if (l > what_len) what_len = l; } |