From: uz Date: Thu, 3 Jun 2010 20:18:43 +0000 (+0000) Subject: Use _seterrno to make the code shorter. X-Git-Tag: V2.13.3~744 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c3922228a989cf93e3b7a2a7c5099d8f0e15ea5c;p=cc65 Use _seterrno to make the code shorter. git-svn-id: svn://svn.cc65.org/cc65/trunk@4688 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/fdopen.c b/libsrc/common/fdopen.c index 6f0ea365a..cfd649d75 100644 --- a/libsrc/common/fdopen.c +++ b/libsrc/common/fdopen.c @@ -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 */