[PATCH] switch stat and fopen

Marcus Meissner meissner at suse.de
Tue Feb 13 06:26:13 CST 2007


On Tue, Feb 13, 2007 at 05:28:52PM +0900, Mike McCormack wrote:
> 
> Marcus Meissner wrote:
> 
> >-    if (!(fin = fopen(input_file_name, "r"))) return 0;
> >     if (stat(input_file_name, &st) < 0) return 0;
> >+    if (!(fin = fopen(input_file_name, "r"))) return 0;
> 
> Wouldn't it be better to use fstat here to avoid a race condition?

Done.

Ciao, Marcus



More information about the wine-devel mailing list