LWN.net Logo

Why use such misleading names for functions?

Why use such misleading names for functions?

Posted Nov 25, 2010 10:18 UTC (Thu) by mpr22 (subscriber, #60784)
In reply to: Why use such misleading names for functions? by rvfh
Parent article: On breaking things

Any naive implementation of ISO C memcpy() is almost certain to have been unsafe in one direction. Either it starts at the end and works backward, making it work reliably for "dest > src, src + len > dest", or it starts at the beginning and works forward, making it work reliably for "dest < src, dest + len > src". (Of course, some bunch of demented jerks implementing a Deathmaster 9000 probably made it start at the middle and oscillate outwards.)

As for your proposed grand rename: You're quite right. Feel free to try and persuade the ISO C standard committee of your correctness.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds