[Cbe-oss-dev] [PATCH 1/3] libspe, libspe2: Fix C99 ferror() handler
Kazunori Asayama
asayama at sm.sony.co.jp
Wed Jan 31 20:50:21 EST 2007
[PATCH 1/3] libspe,libspe2: Fix C99 ferror() handler
Attached is a patch to fix the following bug of ferror() in libspe and
libspe2:
- ferror() does not return result.
----
Index: libspe2/spebase/default_c99_handler.c
===================================================================
--- libspe2.orig/spebase/default_c99_handler.c
+++ libspe2/spebase/default_c99_handler.c
@@ -1876,12 +1876,15 @@ int default_c99_handler_feof(char *ls, u
int default_c99_handler_ferror(char *ls, unsigned long opdata)
{
DECL_1_ARGS();
+ DECL_RET();
FILE *stream;
+ int rc;
DEBUG_PRINTF("%s\n", __func__);
CHECK_C99_OPCODE(FERROR);
stream = get_FILE(arg0->slot[0]);
- ferror(stream);
+ rc = ferror(stream);
+ PUT_LS_RC(rc, 0, 0, errno);
return 0;
}
More information about the cbe-oss-dev
mailing list