summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChengwei Yang <chengwei.yang@intel.com>2013-06-26 20:26:37 +0800
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-26 15:22:35 +0100
commit973684f02290cfda7552cc0d1a87c5767660550f (patch)
treed2cd1a2298892517ba54d87dc16d4a23efbeda53 /tools
parent9665b8ecd84c650804945104d1ffe4f06cce199f (diff)
downloaddbus-973684f02290cfda7552cc0d1a87c5767660550f.tar.gz
dbus-launch: fix coding style
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66068
Diffstat (limited to 'tools')
-rw-r--r--tools/dbus-launch.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 632a0042..86d325f9 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -756,31 +756,31 @@ pass_info (const char *runprog, const char *bus_address, pid_t bus_pid,
if (envvar == NULL || args == NULL)
goto oom;
- args[0] = xstrdup (runprog);
+ args[0] = xstrdup (runprog);
if (!args[0])
goto oom;
- for (i = 1; i <= (argc-remaining_args); i++)
- {
- size_t len = strlen (argv[remaining_args+i-1])+1;
- args[i] = malloc (len);
- if (!args[i])
- goto oom;
- strncpy (args[i], argv[remaining_args+i-1], len);
- }
- args[i] = NULL;
+ for (i = 1; i <= (argc-remaining_args); i++)
+ {
+ size_t len = strlen (argv[remaining_args+i-1])+1;
+ args[i] = malloc (len);
+ if (!args[i])
+ goto oom;
+ strncpy (args[i], argv[remaining_args+i-1], len);
+ }
+ args[i] = NULL;
- strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS=");
- strcat (envvar, bus_address);
- putenv (envvar);
+ strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS=");
+ strcat (envvar, bus_address);
+ putenv (envvar);
- execvp (runprog, args);
- fprintf (stderr, "Couldn't exec %s: %s\n", runprog, strerror (errno));
- exit (1);
+ execvp (runprog, args);
+ fprintf (stderr, "Couldn't exec %s: %s\n", runprog, strerror (errno));
+ exit (1);
}
else
{
print_variables (bus_address, bus_pid, bus_wid, c_shell_syntax,
- bourne_shell_syntax, binary_syntax);
+ bourne_shell_syntax, binary_syntax);
}
verbose ("dbus-launch exiting\n");