lkml.org 
[lkml]   [1998]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: faster strcpy()
From
Date
> I changed the definition of strcpy in /usr/include/string.h to
> #define strcpy(a,b) (char *)memcpy(a,b,strlen(b))
I don't like it, due to the side-effect : b is evaluated twice
Imagine if somebody uses the macro like this :

strcpy(foo, ++bar); /* I'm dead */

--
Regis "HPReg" Duchesne - Engineering Student at ***** ******** *****
www http://www.via.ecp.fr/~regis/
(O o) I use Linux & 3Com (1135 KB/s over 10Mb/s ethernet)
--.oOO--(_)--OOo.-----------------------------------------------------------

-
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    [W:0.098 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site