|
From: Howard C. <hy...@sy...> - 2005-01-24 03:52:03
|
Albert Cahalan wrote: >if(foo) foo=0; // foo was uninitialized > >This code is rather odd I admit, but it is has perfectly >well-defined behavior. It initializes foo to 0, skipping >the store if foo is already 0. > Doesn't seem like it's worth spending any time to fix this. Better to fix the source code, it's just silly. Always faster to just store the value than to test/branch. -- -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support |