Re: [libvirt] [PATCH] network_conf.c: correct the value of the 'result' variable

2013/11/1 Eric Blake <eblake@redhat.com>:
[off-list]
On 10/31/2013 06:20 PM, Hongwei Bi wrote:
Your system clock is off. From your headers:
Received: from localhost ([112.23.86.63]) by mx.google.com with ESMTPSA id q4sm5224371pba.12.2013.10.31.09.39.20 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Oct 2013 09:39:21 -0700 (PDT) Date: Fri, 1 Nov 2013 08:20:12 +0800
your system claimed to have sent at 12:20 UTC on Friday, but your mail server received it at 16:39 UTC on Thursday. Your clock is about 8 hours off, and it messes up mail clients that sort threads by most recent activity.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
According to the following link https://www.redhat.com/archives/libvir-list/2013-November/msg00016.html It seems that there is no need to add this patch. But the caller virNetworkDefFormatInternal() has a check of the return value which is described as " if (virNetworkDNSDefFormat(buf, &def->dns) < 0) ". So I think we should at least change one or the other.

On 11/01/2013 03:54 AM, Hongwei Bi wrote:
2013/11/1 Eric Blake <eblake@redhat.com>:
[off-list]
On 10/31/2013 06:20 PM, Hongwei Bi wrote:
Your system clock is off. From your headers:
I'm a bit surprised that you re-added the list regarding an off-list suggestion; but thank you for fixing your system clock.
It seems that there is no need to add this patch. But the caller virNetworkDefFormatInternal() has a check of the return value which is described as " if (virNetworkDNSDefFormat(buf, &def->dns) < 0) ". So I think we should at least change one or the other.
No. Just becuase virNetworkDNSDefFormat() currently has no failure paths does not mean that it will not gain some in the future. It's safer to keep the caller code checking for errors, even if none currently happen. The existing code is fine as is. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

2013/11/1 Eric Blake <eblake@redhat.com>:
On 11/01/2013 03:54 AM, Hongwei Bi wrote:
2013/11/1 Eric Blake <eblake@redhat.com>:
[off-list]
On 10/31/2013 06:20 PM, Hongwei Bi wrote:
Your system clock is off. From your headers:
I'm a bit surprised that you re-added the list regarding an off-list suggestion; but thank you for fixing your system clock.
It seems that there is no need to add this patch. But the caller virNetworkDefFormatInternal() has a check of the return value which is described as " if (virNetworkDNSDefFormat(buf, &def->dns) < 0) ". So I think we should at least change one or the other.
No. Just becuase virNetworkDNSDefFormat() currently has no failure paths does not mean that it will not gain some in the future. It's safer to keep the caller code checking for errors, even if none currently happen. The existing code is fine as is.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Thanks for your explanation. As you say above , is it the same case the virNetworkObjReplacePersistentDef 's definition and its usage in network_conf.c ?
participants (2)
-
Eric Blake
-
Hongwei Bi