From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
To: gdb-patches@sourceware.org
Subject: [pushed] gdb: remove braces in a for-loop
Date: Tue, 21 Apr 2026 09:41:58 +0200 [thread overview]
Message-ID: <20260421074158.3375916-1-tankut.baris.aktemur@intel.com> (raw)
Remove the braces of the body of a for-loop and reduce indentation.
Patch can be viewed clearer with 'git show -w'.
---
gdb/remote.c | 42 ++++++++++++++++++++----------------------
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/gdb/remote.c b/gdb/remote.c
index c67ef5de344..1455838c2cf 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -4616,28 +4616,26 @@ remote_target::update_thread_list ()
/* And now add threads we don't know about yet to our list. */
for (thread_item &item : context.items)
- {
- if (item.ptid != null_ptid)
- {
- /* In non-stop mode, we assume new found threads are
- running until proven otherwise with a stop reply. In
- all-stop, we can only get here if all threads are
- stopped. */
- thread_int_state internal_state = (target_is_non_stop_p ()
- ? THREAD_INT_RUNNING
- : THREAD_INT_STOPPED);
-
- remote_notice_new_inferior (item.ptid, internal_state);
-
- thread_info *tp = this->find_thread (item.ptid);
- remote_thread_info *info = get_remote_thread_info (tp);
- info->core = item.core;
- info->extra = std::move (item.extra);
- info->name = std::move (item.name);
- info->id_str = std::move (item.id_str);
- info->thread_handle = std::move (item.thread_handle);
- }
- }
+ if (item.ptid != null_ptid)
+ {
+ /* In non-stop mode, we assume new found threads are
+ running until proven otherwise with a stop reply. In
+ all-stop, we can only get here if all threads are
+ stopped. */
+ thread_int_state internal_state = (target_is_non_stop_p ()
+ ? THREAD_INT_RUNNING
+ : THREAD_INT_STOPPED);
+
+ remote_notice_new_inferior (item.ptid, internal_state);
+
+ thread_info *tp = this->find_thread (item.ptid);
+ remote_thread_info *info = get_remote_thread_info (tp);
+ info->core = item.core;
+ info->extra = std::move (item.extra);
+ info->name = std::move (item.name);
+ info->id_str = std::move (item.id_str);
+ info->thread_handle = std::move (item.thread_handle);
+ }
}
if (!got_list)
--
2.34.1
Intel Deutschland GmbH
Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
reply other threads:[~2026-04-21 7:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260421074158.3375916-1-tankut.baris.aktemur@intel.com \
--to=tankut.baris.aktemur@intel.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox