1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-27 12:29:33 +00:00

Use _seterrno to make the code shorter.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4688 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2010-06-03 20:18:43 +00:00
parent e9310f8ec1
commit c3922228a9

View File

@ -26,8 +26,7 @@ FILE* __fastcall__ fdopen (int handle, const char* /*mode*/)
/* Find a free file slot */
if (!(f = _fdesc ())) {
/* No slots */
_errno = EMFILE; /* Too many files */
return 0;
return (FILE*) _seterrno (EMFILE); /* Too many files */
}
/* Insert the handle, and return the descriptor */