ssld: avoid clang static analysis warning
Edit by @aaronmdjones: fix for loop initialisation and inner condition
This commit is contained in:
parent
b582b00585
commit
4f8866f680
1 changed files with 4 additions and 2 deletions
|
@ -1181,11 +1181,13 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
int x;
|
int x;
|
||||||
for(x = 0; x < maxfd; x++)
|
|
||||||
|
for(x = 3; x < maxfd; x++)
|
||||||
{
|
{
|
||||||
if(x != ctlfd && x != pipefd && x > 2)
|
if(x != ctlfd && x != pipefd)
|
||||||
close(x);
|
close(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = open("/dev/null", O_RDWR);
|
x = open("/dev/null", O_RDWR);
|
||||||
|
|
||||||
if(x >= 0)
|
if(x >= 0)
|
||||||
|
|
Loading…
Reference in a new issue