diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2006-11-22 21:19:56 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2006-11-22 21:19:56 +0000 |
commit | 9bc5b6181bcaf823ff1bce61e2ca984920915afb (patch) | |
tree | 5d805d16b301ba8f9a2e2fead05aa8f99092fd56 /newlib/libc/machine/spu/strncpy.c | |
parent | d22713e25db2660fa35444f572673624804b6586 (diff) | |
download | cygnal-9bc5b6181bcaf823ff1bce61e2ca984920915afb.tar.gz cygnal-9bc5b6181bcaf823ff1bce61e2ca984920915afb.tar.bz2 cygnal-9bc5b6181bcaf823ff1bce61e2ca984920915afb.zip |
2006-11-22 Luca Barbato <lu_zero@gentoo.org>
* libc/machine/spu/memcpy.c: Use spu_splats, explicit cast.
* libc/machine/spu/memmove.c: Use spu_splats, explicit cast.
* libc/machine/spu/memset.c: Use spu_splats, remove apple-cast.
* libc/machine/spu/strchr.c: Use spu_splats, remove apple-cast.
* libc/machine/spu/strncat.c: Explicit cast.
* libc/machine/spu/strncmp.c: Use spu_splats.
* libc/machine/spu/strncpy.c: Explicit cast.
* libc/machine/spu/strrchr.c: Use spu_splats.
* libc/machine/spu/strspn.c: Use spu_splats.
Diffstat (limited to 'newlib/libc/machine/spu/strncpy.c')
-rw-r--r-- | newlib/libc/machine/spu/strncpy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/machine/spu/strncpy.c b/newlib/libc/machine/spu/strncpy.c index f1c89f571..5e6169f32 100644 --- a/newlib/libc/machine/spu/strncpy.c +++ b/newlib/libc/machine/spu/strncpy.c @@ -40,12 +40,12 @@ */ char * strncpy(char * __restrict__ dest, const char * __restrict__ src, size_t n) { - size_t len; + unsigned int len; unsigned int cmp, skip, mask; vec_uchar16 *ptr, data; vec_uint4 cnt, gt, N; - N = spu_promote(n, 0); + N = spu_promote((unsigned int)n, 0); /* Determine the string length, including termination character, * clamped to n characters. @@ -74,7 +74,7 @@ char * strncpy(char * __restrict__ dest, const char * __restrict__ src, size_t n /* len = MIN(len, n) */ - len = spu_extract(spu_sel(spu_promote(len, 0), N, gt), 0); + len = spu_extract(spu_sel(spu_promote((unsigned int)len, 0), N, gt), 0); /* Perform a memcpy of the resulting length */ |