On Okt 12 2016, Nathan Sidwell <nat...@acm.org> wrote:

> @@ -182,9 +176,7 @@ gcov_open (const char *name, int mode)
>        return 0;
>      }
>  
> -  if (mode > 0)
> -    gcov_var.mode = 1;
> -  else if (mode == 0)
> +  if (mode == 0)
>      {
>        struct stat st;
>  
> @@ -194,21 +186,20 @@ gcov_open (const char *name, int mode)
>         gcov_var.file = 0;
>         return 0;
>       }
> -      if (st.st_size != 0)
> -     gcov_var.mode = 1;
> -      else
> -     gcov_var.mode = mode * 2 + 1;
> +      gcov_var.mode = 1;

Do we still need to call fstat?  I don't think it can ever fail here.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to