Don't write more nul bytes than necessary
authorGé van Geldorp <ge@gse.nl>
Tue, 27 Jan 2004 21:43:47 +0000 (21:43 +0000)
committerGé van Geldorp <ge@gse.nl>
Tue, 27 Jan 2004 21:43:47 +0000 (21:43 +0000)
svn path=/trunk/; revision=7891

reactos/lib/string/i386/tcsncpy.h
reactos/lib/string/tcsncpy.h

index e5d1d59..93a484a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tcsncpy.h,v 1.1 2003/07/06 23:04:19 hyperion Exp $
+/* $Id: tcsncpy.h,v 1.2 2004/01/27 21:43:47 gvg Exp $
  */
 
 #include "tchar.h"
@@ -22,7 +22,6 @@ _tcsncpy:
  _tstos
  test %_treg(a), %_treg(a)
  jnz  .L1
- rep  _tstos
 
 .L2:
  mov  0x0C(%esp), %eax
index e543cdd..03b363b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: tcsncpy.h,v 1.1 2003/07/06 23:04:19 hyperion Exp $
+/* $Id: tcsncpy.h,v 1.2 2004/01/27 21:43:47 gvg Exp $
  */
 
 #include <stddef.h>
@@ -15,7 +15,6 @@ _TCHAR * _tcsncpy(_TCHAR * dst, const _TCHAR * src, size_t n)
   {
    if((*d ++ = *s ++) == 0)
    {
-    while (-- n != 0) *d ++ = 0;
     break;
    }
   }