What’s Wrong with this code? – 2

What’s wrong with this code?

UINT a;
.
.
.
DoSomething(HIWORD(a));
void DoSomething(int x)
{
 if (x < 0)
 {
  //do something
 }
 
}

I recently ran into this in some code I was working on.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

1 thought on “What’s Wrong with this code? – 2

  1. Pingback: Philosophical Geek » What’s Wrong with this code? - 2 - Answer

Leave a Reply

Your email address will not be published. Required fields are marked *