wsockd: avoid clang static analysis warning
Don't set `x = 0` twice.
This commit is contained in:
parent
26acc0c4fd
commit
3ec3b44c7e
1 changed files with 3 additions and 2 deletions
|
@ -951,7 +951,7 @@ int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *s_ctlfd, *s_pipe, *s_pid;
|
const char *s_ctlfd, *s_pipe, *s_pid;
|
||||||
int ctlfd, pipefd, x, maxfd;
|
int ctlfd, pipefd, maxfd;
|
||||||
maxfd = maxconn();
|
maxfd = maxconn();
|
||||||
|
|
||||||
s_ctlfd = getenv("CTL_FD");
|
s_ctlfd = getenv("CTL_FD");
|
||||||
|
@ -970,8 +970,9 @@ main(int argc, char **argv)
|
||||||
ctlfd = atoi(s_ctlfd);
|
ctlfd = atoi(s_ctlfd);
|
||||||
pipefd = atoi(s_pipe);
|
pipefd = atoi(s_pipe);
|
||||||
ppid = atoi(s_pid);
|
ppid = atoi(s_pid);
|
||||||
x = 0;
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
int x = 0;
|
||||||
for(x = 0; x < maxfd; x++)
|
for(x = 0; x < maxfd; x++)
|
||||||
{
|
{
|
||||||
if(x != ctlfd && x != pipefd && x > 2)
|
if(x != ctlfd && x != pipefd && x > 2)
|
||||||
|
|
Loading…
Reference in a new issue