[PATCH] switch stat and fopen

Mike McCormack mike at codeweavers.com
Tue Feb 13 02:28:52 CST 2007


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?

Mike



More information about the wine-devel mailing list