about summary refs log tree commit diff
path: root/wcsmbs/wcpncpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wcpncpy.c')
-rw-r--r--wcsmbs/wcpncpy.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/wcsmbs/wcpncpy.c b/wcsmbs/wcpncpy.c
index df7efd7fb0..bd62e62682 100644
--- a/wcsmbs/wcpncpy.c
+++ b/wcsmbs/wcpncpy.c
@@ -31,8 +31,6 @@ __wcpncpy (dest, src, n)
   wint_t c;
   wchar_t *const s = dest;
 
-  --dest;
-
   if (n >= 4)
     {
       size_t n4 = n >> 2;
@@ -40,19 +38,19 @@ __wcpncpy (dest, src, n)
       for (;;)
 	{
 	  c = *src++;
-	  *++dest = c;
+	  *dest++ = c;
 	  if (c == L'\0')
 	    break;
 	  c = *src++;
-	  *++dest = c;
+	  *dest++ = c;
 	  if (c == L'\0')
 	    break;
 	  c = *src++;
-	  *++dest = c;
+	  *dest++ = c;
 	  if (c == L'\0')
 	    break;
 	  c = *src++;
-	  *++dest = c;
+	  *dest++ = c;
 	  if (c == L'\0')
 	    break;
 	  if (--n4 == 0)