From f15910e5f185feb467ad1ed4e4096da3ccc89b36 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Sat, 17 Jul 2010 19:13:07 +0000 Subject: [PATCH] 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 --- libsrc/apple2/opendir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/apple2/opendir.c b/libsrc/apple2/opendir.c index ad415705a..98fd4a348 100644 --- a/libsrc/apple2/opendir.c +++ b/libsrc/apple2/opendir.c @@ -65,7 +65,7 @@ DIR* __fastcall__ opendir (register const char* name) if ((dir = malloc (sizeof (*dir))) == NULL) { /* May not have been done by malloc() */ - errno = ENOMEM; + _directerrno (ENOMEM); /* Return failure */ return NULL; @@ -96,8 +96,8 @@ DIR* __fastcall__ opendir (register const char* name) } /* EOF: Most probably no directory file at all */ - if (errno == 0) { - errno = EINVAL; + if (_oserror == 0) { + _directerrno (EINVAL); } /* Cleanup directory file */ -- 2.39.5