[Cbe-oss-dev] [PATCH 1/3] libspe2: Fix return value of C99 tmpfile handler

Kazunori Asayama asayama at sm.sony.co.jp
Tue Apr 10 23:44:40 EST 2007


The current implementation of C99 tmpfile handler in libspe2 does not
return a proper value when PPE side tmpfile() call is failed. Here is
a patch to fix the problem.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>

Index: libspe2-2.1.0/spebase/default_c99_handler.c
===================================================================
--- libspe2-2.1.0.orig/spebase/default_c99_handler.c
+++ libspe2-2.1.0/spebase/default_c99_handler.c
@@ -834,6 +834,8 @@ int default_c99_handler_tmpfile(char *ls
 		spe_FILE_ptrs[i] = tmpfile();
 		if (spe_FILE_ptrs[i])
 		    nr_spe_FILE_ptrs++;
+		else
+		    i = 0;
 		PUT_LS_RC(i, 0, 0, errno);
 		break;
 	    }



More information about the cbe-oss-dev mailing list