Commit f5545ebe by Nathan Sidwell Committed by Nathan Sidwell

[PATCH] A couple of driver cleanups

https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00624.html
	* gcc.c (execute): Simplify cond-expr into if.  Reformat comment.
	(run_attempt): Reformat line break

From-SVN: r271131
parent 2a03d8ca
2019-05-13 Nathan Sidwell <nathan@acm.org>
* gcc.c (execute): Simplify cond-expr into if. Reformat comment.
(run_attempt): Reformat line break.
2019-05-13 David Edelsohn <dje.gcc@gmail.com> 2019-05-13 David Edelsohn <dje.gcc@gmail.com>
PR target/90418 PR target/90418
......
...@@ -3068,7 +3068,8 @@ execute (void) ...@@ -3068,7 +3068,8 @@ execute (void)
if (!wrapper_string) if (!wrapper_string)
{ {
string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false); string = find_a_file (&exec_prefixes, commands[0].prog, X_OK, false);
commands[0].argv[0] = (string) ? string : commands[0].argv[0]; if (string)
commands[0].argv[0] = string;
} }
for (n_commands = 1, i = 0; argbuf.iterate (i, &arg); i++) for (n_commands = 1, i = 0; argbuf.iterate (i, &arg); i++)
...@@ -3077,8 +3078,7 @@ execute (void) ...@@ -3077,8 +3078,7 @@ execute (void)
#if defined (__MSDOS__) || defined (OS2) || defined (VMS) #if defined (__MSDOS__) || defined (OS2) || defined (VMS)
fatal_error (input_location, "%<-pipe%> not supported"); fatal_error (input_location, "%<-pipe%> not supported");
#endif #endif
argbuf[i] = 0; /* Termination of argbuf[i] = 0; /* Termination of command args. */
command args. */
commands[n_commands].prog = argbuf[i + 1]; commands[n_commands].prog = argbuf[i + 1];
commands[n_commands].argv commands[n_commands].argv
= &(argbuf.address ())[i + 1]; = &(argbuf.address ())[i + 1];
...@@ -6926,8 +6926,8 @@ run_attempt (const char **new_argv, const char *out_temp, ...@@ -6926,8 +6926,8 @@ run_attempt (const char **new_argv, const char *out_temp,
fatal_error (input_location, "pex_init failed: %m"); fatal_error (input_location, "pex_init failed: %m");
errmsg = pex_run (pex, pex_flags, new_argv[0], errmsg = pex_run (pex, pex_flags, new_argv[0],
CONST_CAST2 (char *const *, const char **, &new_argv[1]), out_temp, CONST_CAST2 (char *const *, const char **, &new_argv[1]),
err_temp, &err); out_temp, err_temp, &err);
if (errmsg != NULL) if (errmsg != NULL)
{ {
errno = err; errno = err;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment