Function fcntl() only takes 2 args when using F_GETFL.

This commit is contained in:
Wayne Davison committed 2006-10-13 06:26:02 +00:00
1 parent e8b21fe406
commit ff530f04a0
1 file changed
+2 -2
+2 -2
View File
@@ -45,7 +45,7 @@ void set_nonblocking(int fd)
{
int val;
if ((val = fcntl(fd, F_GETFL, 0)) == -1)
if ((val = fcntl(fd, F_GETFL)) == -1)
return;
if (!(val & NONBLOCK_FLAG)) {
val |= NONBLOCK_FLAG;
@@ -58,7 +58,7 @@ void set_blocking(int fd)
{
int val;
if ((val = fcntl(fd, F_GETFL, 0)) == -1)
if ((val = fcntl(fd, F_GETFL)) == -1)
return;
if (val & NONBLOCK_FLAG) {
val &= ~NONBLOCK_FLAG;