lkml.org 
[lkml]   [1998]   [Apr]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 24 Apr 1998 11:58:22 +0100 (BST)
FromRiley Williams <>
SubjectRe: faster strcpy()
Hi there.

 >> #define strcpy(a,b) (char *)memcpy(a,b,strlen(b))

 > As I understand, it first finds the length of b and then in second
 > pass it copies the data. It would be even faster if we could do it
 > with 1 pass (but fast like memcpy).

Does it do that right? I have a feeling it fails to copy the
terminating \0 byte, thus leaving an unterminated string - remember
that strlen does NOT include the \0 in the count it returns...

Best wishes from Riley.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2008