cvs commit: fptools/ghc/lib/std/cbits lockFile.c

Simon Marlow simonmar@glass.cse.ogi.edu
Mon, 21 May 2001 04:02:15 -0700


simonmar    2001/05/21 04:02:15 PDT

  Modified files:
    ghc/lib/std/cbits    lockFile.c 
  Log:
  Re-instate the missing fstat call.
  
  By some bizarre coincidence, this function declared a 'struct stat',
  and failed to initialize it, but in practice the uninitialized memory
  was in the exact same place on the stack as the struct stat from a
  previous call to fstat, which meant all the tests worked :-)
  
  Also, apparently gcc doesn't warn about uninitialised use of structure
  fields.
  
  Revision  Changes    Path
  1.2       +15 -2     fptools/ghc/lib/std/cbits/lockFile.c