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

Made use of the new common __directerrno and __mappederrno function.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4749 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
ol.sc 2010-07-17 19:13:07 +00:00
parent b1dab3a37d
commit f15910e5f1

View File

@ -65,7 +65,7 @@ DIR* __fastcall__ opendir (register const char* name)
if ((dir = malloc (sizeof (*dir))) == NULL) { if ((dir = malloc (sizeof (*dir))) == NULL) {
/* May not have been done by malloc() */ /* May not have been done by malloc() */
errno = ENOMEM; _directerrno (ENOMEM);
/* Return failure */ /* Return failure */
return NULL; return NULL;
@ -96,8 +96,8 @@ DIR* __fastcall__ opendir (register const char* name)
} }
/* EOF: Most probably no directory file at all */ /* EOF: Most probably no directory file at all */
if (errno == 0) { if (_oserror == 0) {
errno = EINVAL; _directerrno (EINVAL);
} }
/* Cleanup directory file */ /* Cleanup directory file */