Wireshark-commits: [Wireshark-commits] rev 35973: /trunk/ /trunk/: capture_ui_utils.c

Date: Thu, 17 Feb 2011 04:35:16 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=35973

User: guy
Date: 2011/02/16 08:35 PM

Log:
 Use "XXX != NULL" rather than "XXX" to test for a null pointer; either
 I'm missing something or the MSVC++ code analyzer doesn't realize that
 in
 
 	if (XXX)
 		dereference XXX
 
 will not dereference XXX if it's null - maybe "if (XXX != NULL)" will do
 the trick (if so, the code analyzer is buggy, because "if (XXX !=
 NULL)", "if (XXX != 0)", and "if (XXX)" mean the exact same thing if XXX
 is a pointer-valued expression, really, truly, even if a null pointer
 isn't represented as all zero bits or if it's wider than an int).
 
 Clean up indentation.

Directory: /trunk/
  Changes    Path                  Action
  +31 -32    capture_ui_utils.c    Modified