public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [pushed] gdb: bool-ify users of file_is_auto_load_safe
Date: Wed, 13 Jan 2021 12:01:31 -0500	[thread overview]
Message-ID: <20210113170131.1422268-1-simon.marchi@polymtl.ca> (raw)

A previous patch missed those.

gdb/ChangeLog:

	* auto-load.c (auto_load_objfile_script_1): Use bool.
	(execute_script_contents): Use bool.

Change-Id: I214bf7ed25af36ced375eb3ec5a403ded2fa572e
---
 gdb/ChangeLog   |  5 +++++
 gdb/auto-load.c | 18 +++++++++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e9f7982cf00a..58392b25cd9f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-13  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	* auto-load.c (auto_load_objfile_script_1): Use bool.
+	(execute_script_contents): Use bool.
+
 2021-01-13  Simon Marchi  <simon.marchi@polymtl.ca>
 
 	* auto-load.h (auto_load_gdb_scripts_enabled): Return bool, move
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 0d5532b4882e..b6cb79af34eb 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -808,10 +808,9 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
 
   if (input)
     {
-      int is_safe;
       struct auto_load_pspace_info *pspace_info;
 
-      is_safe
+      bool is_safe
 	= file_is_auto_load_safe (debugfile,
 				  _("auto-load: Loading %s script \"%s\""
 				    " by extension for objfile \"%s\".\n"),
@@ -968,7 +967,7 @@ execute_script_contents (struct auto_load_pspace_info *pspace_info,
   objfile_script_executor_func *executor;
   const char *newline, *script_text;
   const char *name;
-  int is_safe, in_hash_table;
+  int in_hash_table;
 
   /* The first line of the script is the name of the script.
      It must not contain any kind of space character.  */
@@ -1022,12 +1021,13 @@ of file %ps."),
       return;
     }
 
-  is_safe = file_is_auto_load_safe (objfile_name (objfile),
-				    _("auto-load: Loading %s script "
-				      "\"%s\" from section \"%s\" of "
-				      "objfile \"%s\".\n"),
-				    ext_lang_name (language), name,
-				    section_name, objfile_name (objfile));
+  bool is_safe
+    = file_is_auto_load_safe (objfile_name (objfile),
+			      _("auto-load: Loading %s script "
+				"\"%s\" from section \"%s\" of "
+				"objfile \"%s\".\n"),
+			      ext_lang_name (language), name,
+			      section_name, objfile_name (objfile));
 
   in_hash_table = maybe_add_script_text (pspace_info, is_safe, name, language);
 
-- 
2.29.2


             reply	other threads:[~2021-01-13 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 17:01 Simon Marchi [this message]
2021-01-13 17:03 ` Christian Biesinger
2021-01-13 17:09   ` Simon Marchi

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=20210113170131.1422268-1-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).