bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: full_read depends on incoming errno


From: Eli Zaretskii
Subject: Re: full_read depends on incoming errno
Date: Wed, 20 Feb 2013 22:01:12 +0200

> From: Andy Wingo <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Wed, 20 Feb 2013 20:58:13 +0100
> 
>     if (full_read (fd, cookie, sizeof cookie) != sizeof cookie
>         || full_read (fd, SCM_BYTEVECTOR_CONTENTS (bv),
>                       SCM_BYTEVECTOR_LENGTH (bv)) != SCM_BYTEVECTOR_LENGTH 
> (bv))
>       {
>         int errno_save = errno;
>         (void) close (fd);
>         errno = errno_save;
>         if (errno)
>           SCM_SYSERROR;
>         scm_misc_error (FUNC_NAME, "file truncated while reading", SCM_EOL);
>       }
> 
> Should be OK, no?

Yes, thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]