From: Mathieu Desnoyers Date: Mon, 8 Aug 2011 15:08:29 +0000 (-0400) Subject: Cleanup compiler warnings X-Git-Tag: v2.0-pre8~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=274e143ba43aefcd257a53048b7972dc89e94316;p=lttng-tools.git Cleanup compiler warnings Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index d10483066..567742ebb 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -119,9 +119,11 @@ static gid_t allowed_group(void) { struct group *grp; - grp = (opt_tracing_group != NULL) ? - (grp = getgrnam(opt_tracing_group)) : - (grp = getgrnam(default_tracing_group)); + if (opt_tracing_group) { + grp = getgrnam(opt_tracing_group); + } else { + grp = getgrnam(default_tracing_group); + } if (!grp) { return -1; } else { @@ -2439,8 +2441,6 @@ end: */ static int check_existing_daemon(void) { - int ret; - if (access(client_unix_sock_path, F_OK) < 0 && access(apps_unix_sock_path, F_OK) < 0) return 0; @@ -2460,7 +2460,6 @@ static int check_existing_daemon(void) static int set_permissions(void) { int ret; - struct group *grp; gid_t gid; gid = allowed_group();