1 void * CreateFile();
   2 void * socket();
   3 
   4 int func (void)
   5 {
   6         int *x;
   7 
   8         if (x = CreateFile()) {
   9                 
  10         }
  11 
  12         x = socket();
  13         if (x != 0) {
  14               
  15         }
  16         return;
  17 }
  18 /*
  19  * check-name: use INVALID_HANDLE_VALUE not zero
  20  * check-command: smatch -p=wine sm_wine_filehandles.c
  21  *
  22  * check-output-start
  23 sm_wine_filehandles.c:8 func() error: comparing a filehandle against zero 'x'
  24 sm_wine_filehandles.c:13 func() error: comparing a filehandle against zero 'x'
  25  * check-output-end
  26  */