Messages in this thread | | | Subject | Re: faster strcpy() | From | Regis Duchesne <> | Date | 24 Apr 1998 21:11:19 +0200 |
| |
> 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
| |