Re: [libvirt] [PATCH 09/17] use errno, not socket_errno()

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:

> On Tue, Oct 28, 2008 at 12:21:26PM +0100, Jim Meyering wrote:
>> From: Jim Meyering <meyering@xxxxxxxxxx>
>>
>> * 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.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]