From 63b629b8015545531eb5550f03e919c3b6ae7315 Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 3 Jun 2010 20:21:23 +0000 Subject: [PATCH] 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 --- libsrc/common/fgets.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 */