+2019-09-06 Christian Biesinger <cbiesinger@google.com>
+
+ * defs.h (relocate_gdb_directory): Change int to bool in
+ signature and rename flag to relocatable.
+ * main.c (relocate_path): Likewise.
+ (relocate_gdb_directory): Likewise.
+
2019-09-06 Alan Modra <amodra@gmail.com>
* coffread.c (coff_symfile_read): Constify filename variable.
/* This really belong in utils.c (path-utils.c?), but it references some
globals that are currently only available to main.c. */
-extern char *relocate_gdb_directory (const char *initial, int flag);
+extern char *relocate_gdb_directory (const char *initial, bool relocatable);
\f
/* Annotation stuff. */
/* Relocate a file or directory. PROGNAME is the name by which gdb
was invoked (i.e., argv[0]). INITIAL is the default value for the
- file or directory. FLAG is true if the value is relocatable, false
- otherwise. Returns a newly allocated string; this may return NULL
- under the same conditions as make_relative_prefix. */
+ file or directory. RELOCATABLE is true if the value is relocatable,
+ false otherwise. Returns a newly allocated string; this may return
+ NULL under the same conditions as make_relative_prefix. */
static char *
-relocate_path (const char *progname, const char *initial, int flag)
+relocate_path (const char *progname, const char *initial, bool relocatable)
{
- if (flag)
+ if (relocatable)
return make_relative_prefix (progname, BINDIR, initial);
return xstrdup (initial);
}
function always returns a newly-allocated string. */
char *
-relocate_gdb_directory (const char *initial, int flag)
+relocate_gdb_directory (const char *initial, bool relocatable)
{
char *dir;
- dir = relocate_path (gdb_program_name, initial, flag);
+ dir = relocate_path (gdb_program_name, initial, relocatable);
if (dir)
{
struct stat s;