Fix wrong return value for fcntl(F_SETFL, ...).

This commit is contained in:
Jonas 'Sortie' Termansen 2014-02-15 21:52:32 +01:00
parent 31c310036c
commit 0235fc3a62
1 changed files with 2 additions and 2 deletions

View File

@ -331,7 +331,7 @@ static int sys_fcntl(int fd, int cmd, uintptr_t arg)
// Operations on the file descriptior.
if ( cmd == F_SETFD )
return dtable->SetFlags(fd, (int) arg) ? 0 : -1;;
return dtable->SetFlags(fd, (int) arg) ? 0 : -1;
if ( cmd == F_GETFD )
return dtable->GetFlags(fd);
@ -345,7 +345,7 @@ static int sys_fcntl(int fd, int cmd, uintptr_t arg)
if ( !desc )
return -1;
if ( cmd == F_SETFL )
return desc->SetFlags((int) arg);
return desc->SetFlags((int) arg) ? 0 : -1;
if ( cmd == F_GETFL )
return desc->GetFlags();