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:
@@ -26,8 +26,7 @@ FILE* __fastcall__ fdopen (int handle, const char* /*mode*/)
|
|||||||
/* Find a free file slot */
|
/* Find a free file slot */
|
||||||
if (!(f = _fdesc ())) {
|
if (!(f = _fdesc ())) {
|
||||||
/* No slots */
|
/* No slots */
|
||||||
_errno = EMFILE; /* Too many files */
|
return (FILE*) _seterrno (EMFILE); /* Too many files */
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Insert the handle, and return the descriptor */
|
/* Insert the handle, and return the descriptor */
|
||||||
|
|||||||
Reference in New Issue
Block a user