Commit 97d413f2 authored by Ray Strode's avatar Ray Strode

autostart-app: initialize i from previous commit

We weren't initializing it to 0.

This commit changes the while loop to a for loop to
make room for  a natural place to initialize i.

https://bugzilla.gnome.org/show_bug.cgi?id=754941
parent 759b2b59
......@@ -1073,7 +1073,7 @@ autostart_app_start_spawn (GsmAutostartApp *app,
ctx = g_app_launch_context_new ();
child_environment = gsm_util_listenv ();
while (child_environment[i] != NULL) {
for (i = 0; child_environment[i] != NULL; i++) {
char **environment_tuple;
const char *key;
const char *value;
......@@ -1086,7 +1086,6 @@ autostart_app_start_spawn (GsmAutostartApp *app,
g_app_launch_context_setenv (ctx, key, value);
g_strfreev (environment_tuple);
i++;
}
if (startup_id != NULL) {
......
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