Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-07-18 20:36:22 +0400
committerJeff Johnston <jjohnstn@redhat.com>2008-07-18 20:36:22 +0400
commitb47d83c6456eba31f9fe59fa06262cc522e5cabf (patch)
tree9d5e2991018dfabef39fc324c4dbedb64c1acae5 /newlib/libc
parent8d7e80c2e127aefd6c9aff4ea9ea8d37969172dd (diff)
2008-07-18 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Fix error in previous patch.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/machine/spu/strcpy.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/machine/spu/strcpy.h b/newlib/libc/machine/spu/strcpy.h
index 946148bd2..b407eaf5b 100644
--- a/newlib/libc/machine/spu/strcpy.h
+++ b/newlib/libc/machine/spu/strcpy.h
@@ -178,7 +178,7 @@ static inline void * _strncpy(char * __restrict__ dest, const char *
}
/* Pad null bytes if the length of the "src" is less than "n" (strncpy). */
- if (checklen && !lastzero && (maxlen != spu_extract(curlen,0)))
- memset(dest + spu_extract(curlen, 0), 0, maxlen - spu_extract(curlen, 0));
+ if (checklen && !lastzero && spu_extract(curlen, 0))
+ memset(dest + maxlen - spu_extract(curlen, 0), 0, spu_extract(curlen, 0));
return (dest);
}