[libvirt] [PATCH 09/17] use errno, not socket_errno()
Jim Meyering
jim at meyering.net
Tue Oct 28 12:26:54 UTC 2008
"Daniel P. Berrange" <berrange at redhat.com> wrote:
> On Tue, Oct 28, 2008 at 12:21:26PM +0100, Jim Meyering wrote:
>> From: Jim Meyering <meyering at redhat.com>
>>
>> * remote_internal.c: s/socket_errno()/errno/, now that gnulib's
>> socket module ensures errno is useful in those cases.
>> @@ -4627,7 +4627,7 @@ really_write_buf (virConnectPtr conn, struct private_data *priv,
>> do {
>> err = send (priv->sock, p, len, 0);
>> if (err == -1) {
>> - int errno_ = socket_errno ();
>> + int errno_ = errno;
>> if (errno_ == EINTR || errno_ == EAGAIN)
>> continue;
>> error (in_open ? NULL : conn,
>> @@ -4710,7 +4710,7 @@ really_read_buf (virConnectPtr conn, struct private_data *priv,
>> reread:
>> err = recv (priv->sock, bytes, len, 0);
>> if (err == -1) {
>> - int errno_ = socket_errno ();
>> + int errno_ = errno;
>> if (errno_ == EINTR)
>> goto reread;
>> error (in_open ? NULL : conn,
>
> Do we need to keep this intermediate variable around ? I think we can
> just of 'if (errno == EINTR)' directly ?
>
> ACK anyway
I debated whether to keep the change simple and mechanical
or to perform fix-ups like that.
Now that you mention it, I'll clean up.
More information about the libvir-list
mailing list