diff options
Diffstat (limited to 'newlib/libc/machine/spu/fscanf.c')
-rw-r--r-- | newlib/libc/machine/spu/fscanf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/newlib/libc/machine/spu/fscanf.c b/newlib/libc/machine/spu/fscanf.c index b97f413b3..b47d93027 100644 --- a/newlib/libc/machine/spu/fscanf.c +++ b/newlib/libc/machine/spu/fscanf.c @@ -58,13 +58,11 @@ typedef struct fscanf(FILE *fp, _CONST char *fmt, ...) { - int* ret; + int ret; c99_vfscanf_t args; CHECK_INIT(_REENT); - ret = (int*) &args; - args.fp = fp->_fp; args.fmt = (char*) fmt; #ifdef _HAVE_STDC @@ -74,9 +72,9 @@ fscanf(FILE *fp, _CONST char *fmt, ...) #endif - __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args); + ret = __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args); va_end (args.ap); - return *ret; + return ret; } #endif /* ! _REENT_ONLY */ |