News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

All devs: watch out for memset

Started by byo, March 07, 2007, 01:58:51 AM

Previous topic - Next topic

byo

I've just read some note written by Krzysztof Kowalczyk on his blog titled: "memset() considered harmful" ().
He has written that people usually swap second ant third parameter which in case of zeroing some data will do nothing.

There's also a query which shows that at least half of calls is invalid.

I've already checked C::B and it has no such "mistakes" :D
But it may be a good tip to check your code ;)

BYO

MortenMacFly

Whohooo... found one... in a quite old piece of code. Luckily it was only *one* and obviously it didn't cause any harm. But the number of google results scare me a little... ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]