From 3da06ba822fbd1a4eb9fd42f56124ad46dbf8852 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 9 Jun 2008 17:26:30 +0000 Subject: [PATCH] 2008-06-09 Ken Werner * libc/machine/spu/strcat.c: Return value fixed. * libc/machine/spu/strncat.c: Likewise. --- newlib/ChangeLog | 5 +++++ newlib/libc/machine/spu/strcat.c | 3 ++- newlib/libc/machine/spu/strncat.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index b46b1093c..13a4bb3c9 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2008-06-09 Ken Werner + + * libc/machine/spu/strcat.c: Return value fixed. + * libc/machine/spu/strncat.c: Likewise. + 2008-05-28 Eric Blake Fix bug in previous patch. diff --git a/newlib/libc/machine/spu/strcat.c b/newlib/libc/machine/spu/strcat.c index 5b57a9b66..9a5185c1b 100644 --- a/newlib/libc/machine/spu/strcat.c +++ b/newlib/libc/machine/spu/strcat.c @@ -41,5 +41,6 @@ */ char *strcat(char * __restrict__ dest, const char * __restrict__ src) { - return _strncpy(_straddr(dest), src, 0, 0, 0); + _strncpy(_straddr(dest), src, 0, 0, 0); + return dest; } diff --git a/newlib/libc/machine/spu/strncat.c b/newlib/libc/machine/spu/strncat.c index d0b891b3b..3eeea7a77 100644 --- a/newlib/libc/machine/spu/strncat.c +++ b/newlib/libc/machine/spu/strncat.c @@ -41,5 +41,6 @@ char * strncat(char * __restrict__ dest, const char * __restrict__ src, size_t n) { - return _strncpy(_straddr(dest), src, n, 1, 1); + _strncpy(_straddr(dest), src, n, 1, 1); + return dest; }