From: uz Date: Thu, 3 Jun 2010 20:21:23 +0000 (+0000) Subject: Call _seterrno instead of assigning to _errno to make the code shorter. X-Git-Tag: V2.13.3~742 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=63b629b8015545531eb5550f03e919c3b6ae7315;p=cc65 Call _seterrno instead of assigning to _errno to make the code shorter. git-svn-id: svn://svn.cc65.org/cc65/trunk@4690 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/fgets.c b/libsrc/common/fgets.c index ab755616a..e65fb4bc8 100644 --- a/libsrc/common/fgets.c +++ b/libsrc/common/fgets.c @@ -25,8 +25,7 @@ char* __fastcall__ fgets (char* s, unsigned size, FILE* f) if (size == 0) { /* Invalid size */ - _errno = EINVAL; - return 0; + return (char*) _seterrno (EINVAL); } /* Read input */