diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-11-18 07:34:33 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-11-18 07:34:33 +0100 |
commit | c487f0da07799446ce468ee2e9dd2ac8d24f9a8a (patch) | |
tree | 1084f90b55ea1d1ea07507e288210d26e1c6c0f8 /src/wchar | |
parent | implement additional string.h and wchar.h functions (diff) | |
download | slibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.gz slibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.bz2 slibc-c487f0da07799446ce468ee2e9dd2ac8d24f9a8a.tar.xz |
fix errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/wchar')
-rw-r--r-- | src/wchar/wcpncpy.c | 2 | ||||
-rw-r--r-- | src/wchar/wcpnmove.c | 2 | ||||
-rw-r--r-- | src/wchar/wcscncpy.c | 2 | ||||
-rw-r--r-- | src/wchar/wcscnmove.c | 2 | ||||
-rw-r--r-- | src/wchar/wcsncpy.c | 2 | ||||
-rw-r--r-- | src/wchar/wcsnmove.c | 2 | ||||
-rw-r--r-- | src/wchar/wcsstrncpy.c | 2 | ||||
-rw-r--r-- | src/wchar/wcsstrnmove.c | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/wchar/wcpncpy.c b/src/wchar/wcpncpy.c index fc5d68b..e291d35 100644 --- a/src/wchar/wcpncpy.c +++ b/src/wchar/wcpncpy.c @@ -40,7 +40,7 @@ wchar_t* wcpncpy(wchar_t* restrict whither, const wchar_t* restrict whence, size { size_t n = wcsnlen(whence, maxlen); wmemcpy(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return whither + n; } diff --git a/src/wchar/wcpnmove.c b/src/wchar/wcpnmove.c index f81caec..25a591a 100644 --- a/src/wchar/wcpnmove.c +++ b/src/wchar/wcpnmove.c @@ -41,7 +41,7 @@ wchar_t* wcpnmove(wchar_t* whither, const wchar_t* whence, size_t maxlen) { size_t n = wcsnlen(whence, maxlen); wmemmove(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return whither + n; } diff --git a/src/wchar/wcscncpy.c b/src/wchar/wcscncpy.c index 91af467..fe0a14f 100644 --- a/src/wchar/wcscncpy.c +++ b/src/wchar/wcscncpy.c @@ -49,7 +49,7 @@ wchar_t* wcscncpy(wchar_t* restrict whither, const wchar_t* restrict whence, wch size_t n = stop == NULL ? wcsnlen(whence, maxlen) : (size_t)(stop - whence); wchar_t* r = stop == NULL ? NULL : (whither + n); wmemcpy(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return r; } diff --git a/src/wchar/wcscnmove.c b/src/wchar/wcscnmove.c index 005a80c..daa518f 100644 --- a/src/wchar/wcscnmove.c +++ b/src/wchar/wcscnmove.c @@ -49,7 +49,7 @@ wchar_t* wcscnmove(wchar_t* whither, const wchar_t* whence, wchar_t c, size_t ma size_t n = stop == NULL ? wcsnlen(whence, maxlen) : (size_t)(stop - whence); wchar_t* r = stop == NULL ? NULL : (whither + n); wmemmove(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return r; } diff --git a/src/wchar/wcsncpy.c b/src/wchar/wcsncpy.c index 56f342d..67631b1 100644 --- a/src/wchar/wcsncpy.c +++ b/src/wchar/wcsncpy.c @@ -37,7 +37,7 @@ wchar_t* wcsncpy(wchar_t* restrict whither, const wchar_t* restrict whence, size { size_t n = wcsnlen(whence, maxlen); wmemcpy(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return whither; } diff --git a/src/wchar/wcsnmove.c b/src/wchar/wcsnmove.c index 899b611..428a9f5 100644 --- a/src/wchar/wcsnmove.c +++ b/src/wchar/wcsnmove.c @@ -39,7 +39,7 @@ wchar_t* wcsnmove(wchar_t* whither, const wchar_t* whence, size_t maxlen) { size_t n = wcsnlen(whence, maxlen); wmemmove(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return whither; } diff --git a/src/wchar/wcsstrncpy.c b/src/wchar/wcsstrncpy.c index 89dd7f7..62ed24c 100644 --- a/src/wchar/wcsstrncpy.c +++ b/src/wchar/wcsstrncpy.c @@ -49,7 +49,7 @@ wchar_t* wcsstrncpy(wchar_t* restrict whither, const wchar_t* restrict whence, size_t n = stop == NULL ? wcsnlen(whence, maxlen) : (size_t)(stop - whence); wchar_t* r = stop == NULL ? NULL : (whither + n); wmemcpy(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return r; } diff --git a/src/wchar/wcsstrnmove.c b/src/wchar/wcsstrnmove.c index f19b4f4..d72bd9c 100644 --- a/src/wchar/wcsstrnmove.c +++ b/src/wchar/wcsstrnmove.c @@ -48,7 +48,7 @@ wchar_t* wcsstrnmove(wchar_t* whither, const wchar_t* whence, const wchar_t* res size_t n = stop == NULL ? wcsnlen(whence, maxlen) : (size_t)(stop - whence); wchar_t* r = stop == NULL ? NULL : (whither + n); wmemmove(whither, whence, n); - wmemset(whither, 0, maxlen - n); + wmemset(whither + n, 0, maxlen - n); return r; } |