agent: Fix compiler warning when building with clang
Fixes: 8b467ad39a ("agent: Add option to open socket as specific user")
This commit is contained in:
@@ -188,6 +188,7 @@ static int open_connection(char *path, char *user)
|
|||||||
close(s);
|
close(s);
|
||||||
return -1;
|
return -1;
|
||||||
case 0:
|
case 0:
|
||||||
|
{
|
||||||
/* child, do everything manually to avoid interacting with
|
/* child, do everything manually to avoid interacting with
|
||||||
* mutexes etc. that are potentially locked in the parent */
|
* mutexes etc. that are potentially locked in the parent */
|
||||||
struct passwd *pwp;
|
struct passwd *pwp;
|
||||||
@@ -209,6 +210,7 @@ static int open_connection(char *path, char *user)
|
|||||||
}
|
}
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
/* not reached */
|
/* not reached */
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
/* parent */
|
/* parent */
|
||||||
if (waitpid(pid, &status, 0) == -1 ||
|
if (waitpid(pid, &status, 0) == -1 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user