summaryrefslogtreecommitdiffstats
path: root/newlib/libc/machine/spu/fopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/machine/spu/fopen.c')
-rw-r--r--newlib/libc/machine/spu/fopen.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/newlib/libc/machine/spu/fopen.c b/newlib/libc/machine/spu/fopen.c
index 1a471cad8..20b36678a 100644
--- a/newlib/libc/machine/spu/fopen.c
+++ b/newlib/libc/machine/spu/fopen.c
@@ -49,7 +49,7 @@ _DEFUN (fopen, (file, mode),
_CONST char *file _AND
_CONST char *mode)
{
- int *ret;
+ int ret;
c99_fopen_t args;
FILE *fp;
struct _reent *ptr = _REENT;
@@ -63,12 +63,11 @@ _DEFUN (fopen, (file, mode),
args.file = file;
args.mode = mode;
- ret = (int *) &args;
- __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
+ ret = __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
- if (*ret) {
- fp->_fp = *ret;
+ if (ret) {
+ fp->_fp = ret;
return fp;
}
else {