1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-24 11:31:31 +00:00

Shortened the code.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5701 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-06-10 18:25:22 +00:00
parent cc5fd1dd72
commit bfd0f58686

View File

@ -21,17 +21,17 @@
FILE* __fastcall__ fdopen (int handle, const char* /*mode*/)
{
FILE* f;
register FILE* f;
/* Find a free file slot */
if (!(f = _fdesc ())) {
/* No slots */
return (FILE*) _seterrno (EMFILE); /* Too many files */
}
if ((f = _fdesc ())) {
/* Insert the handle, and return the descriptor */
f->f_fd = handle;
f->f_flags = _FOPEN;
} else {
/* No slots */
_seterrno (EMFILE); /* Too many files */
}
/* Return the file descriptor */
return f;