Clean-up: common: fix -Wshadow error in lttng_daemonize
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 31 Mar 2021 18:41:48 +0000 (14:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Apr 2021 20:21:54 +0000 (16:21 -0400)
There are two ret variables in the function, not of the same type. Fix
it by moving one to a narrower scope.

Change-Id: If09dc67e95f3d01f9796555fa005638bcb172279
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/daemonize.c

index 594cc58155b59608801d355ec3f419e0d17893c6..cb094b1effa52f7145132792d2845b7ce92e6ea5 100644 (file)
@@ -22,7 +22,6 @@ LTTNG_HIDDEN
 int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
                int close_fds)
 {
 int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
                int close_fds)
 {
-       int ret;
        pid_t pid;
 
        /* Get parent pid of this process. */
        pid_t pid;
 
        /* Get parent pid of this process. */
@@ -35,6 +34,7 @@ int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
        } else if (pid == 0) {
                int fd;
                pid_t sid;
        } else if (pid == 0) {
                int fd;
                pid_t sid;
+               int ret;
 
                /* Child */
 
 
                /* Child */
 
This page took 0.032637 seconds and 4 git commands to generate.