1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 02:29:52 +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* __fastcall__ fdopen (int handle, const char* /*mode*/)
{ {
FILE* f; register FILE* f;
/* Find a free file slot */ /* Find a free file slot */
if (!(f = _fdesc ())) { if ((f = _fdesc ())) {
/* No slots */
return (FILE*) _seterrno (EMFILE); /* Too many files */
}
/* Insert the handle, and return the descriptor */ /* Insert the handle, and return the descriptor */
f->f_fd = handle; f->f_fd = handle;
f->f_flags = _FOPEN; f->f_flags = _FOPEN;
} else {
/* No slots */
_seterrno (EMFILE); /* Too many files */
}
/* Return the file descriptor */ /* Return the file descriptor */
return f; return f;