diff options
Diffstat (limited to 'newlib/libc/machine/spu/scanf.c')
-rw-r--r-- | newlib/libc/machine/spu/scanf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/newlib/libc/machine/spu/scanf.c b/newlib/libc/machine/spu/scanf.c index 76c47ff35..29157a3ba 100644 --- a/newlib/libc/machine/spu/scanf.c +++ b/newlib/libc/machine/spu/scanf.c @@ -56,13 +56,11 @@ typedef struct scanf(_CONST char *fmt, ...) { - int* ret; + int ret; c99_vscanf_t args; CHECK_STD_INIT(_REENT); - ret = (int*) &args; - args.fmt = (char*) fmt; #ifdef _HAVE_STDC va_start (args.ap, fmt); @@ -71,10 +69,10 @@ scanf(_CONST char *fmt, ...) #endif - __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args); + ret = __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args); va_end (args.ap); - return *ret; + return ret; } #endif /* ! _REENT_ONLY */ |