* syscalls.cc (setdtablesize): Call with amount to increment not total amount.

Return success or failure error code.
This commit is contained in:
Christopher Faylor
2001-01-18 04:26:04 +00:00
parent d0319c3b5b
commit 4e2a97b2ac
2 changed files with 10 additions and 3 deletions

View File

@@ -1345,11 +1345,13 @@ system (const char *cmdstring)
return res;
}
extern "C" void
extern "C" int
setdtablesize (int size)
{
if (size > (int)fdtab.size)
fdtab.extend (size);
if (size <= (int)fdtab.size || fdtab.extend (size - fdtab.size))
return 0;
return -1;
}
extern "C" int