summaryrefslogtreecommitdiffstats
path: root/newlib/libc/machine/spu/snprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/machine/spu/snprintf.c')
-rw-r--r--newlib/libc/machine/spu/snprintf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/newlib/libc/machine/spu/snprintf.c b/newlib/libc/machine/spu/snprintf.c
index d48dc6028..98d7f575e 100644
--- a/newlib/libc/machine/spu/snprintf.c
+++ b/newlib/libc/machine/spu/snprintf.c
@@ -63,13 +63,11 @@ _DEFUN(snprintf, (str, size, fmt),
size_t size _AND
_CONST char *fmt _DOTS)
{
- int* ret;
+ int ret;
c99_snprintf_t args;
CHECK_STR_INIT(_REENT);
- ret = (int*) &args;
-
args.str = str;
args.size = size;
args.fmt = fmt;
@@ -79,10 +77,10 @@ _DEFUN(snprintf, (str, size, fmt),
va_start (args.ap);
#endif
- __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
+ ret = __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
va_end (args.ap);
- return *ret;
+ return ret;
}
#endif /* ! _REENT_ONLY */