Hi Erik,

On Nov  2 15:15, Erik M. Bray wrote:
> diff --git a/winsup/cygwin/fhandler_disk_file.cc 
> b/winsup/cygwin/fhandler_disk_file.cc
> index f46e355..9d5ec30 100644
> --- a/winsup/cygwin/fhandler_disk_file.cc
> +++ b/winsup/cygwin/fhandler_disk_file.cc
> @@ -1116,11 +1116,11 @@ fhandler_disk_file::ftruncate (off_t length, bool 
> allow_truncate)
>    int res = -1;

Shouldn't this initialization to -1 go away then?  Or set to 0 and...

> @@ -1160,7 +1159,7 @@ fhandler_disk_file::ftruncate (off_t length, bool 
> allow_truncate)
>                                    &feofi, sizeof feofi,
>                                    FileEndOfFileInformation);
>        if (!NT_SUCCESS (status))
> -     __seterrno_from_nt_status (status);
> +     res = geterrno_from_nt_status (status);
>        else
>       res = 0;

...this else branch go away like you did in posix_fallocate?


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

Reply via email to