do not potentially pass -1 to fcntl()
This commit is contained in:
parent
7f37c2ae00
commit
8f08e4634f
@ -1060,9 +1060,10 @@ main (int argc,
|
|||||||
fh_admin = -1;
|
fh_admin = -1;
|
||||||
}
|
}
|
||||||
flags |= FD_CLOEXEC;
|
flags |= FD_CLOEXEC;
|
||||||
if (0 != fcntl (fh_admin,
|
if ( (-1 != fh_admin) &&
|
||||||
F_SETFD,
|
(0 != fcntl (fh_admin,
|
||||||
flags))
|
F_SETFD,
|
||||||
|
flags)) )
|
||||||
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"fcntl");
|
"fcntl");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user