From ef391e3cbf8f37b72799c2ff03a1d7c5401c8afc Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 7 Jun 2007 04:06:30 +0100 Subject: [PATCH] Re-ordered arguments to execvp. --- src/gssmp_ui.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/gssmp_ui.c b/src/gssmp_ui.c index b1e0e06..25a7e02 100644 --- a/src/gssmp_ui.c +++ b/src/gssmp_ui.c @@ -767,6 +767,15 @@ void fork_lastfm_exe () char *args[10]; + args[0] = config_lastfm_exe; + args[1] = "--lengtsdsh"; + g_snprintf (tmp, 32, "%d", current_length); + args[2] = tmp; + args[3] = "--title"; + args[4] = stored_title; + args[5] = "--artist"; + args[6] = stored_artist; + if( stored_album ) { args[7] = "--album"; @@ -778,19 +787,11 @@ void fork_lastfm_exe () args[7] = NULL; } - args[0] = config_lastfm_exe; - args[1] = "--length"; - g_snprintf (tmp, 32, "%d", current_length); - args[2] = tmp; - args[3] = "--title"; - args[4] = stored_title; - args[5] = "--artist"; - args[6] = stored_artist; - - execvp( config_lastfm_exe, args ); + execvp( args[0], args ); // Should never get here. - fprintf (stderr, "execvp() error launching lastfm exe '%s'.\n", config_lastfm_exe); + fprintf (stderr, "execvp() error launching lastfm exe '%s'.\n", + config_lastfm_exe); } } -- 2.11.4.GIT