On Sun, Jul 28, 2019 at 07:50:28PM +0200, Andrea Bolognani wrote:
On Tue, 2019-07-23 at 17:03 +0100, Daniel P. Berrangé wrote:
> +++ b/src/remote/remote_daemon_dispatch.c
> @@ -2013,6 +2134,7 @@ remoteDispatchConnectClose(virNetServerPtr server
ATTRIBUTE_UNUSED,
> }
>
>
> +
> static int
> remoteDispatchDomainGetSchedulerType(virNetServerPtr server ATTRIBUTE_UNUSED,
> virNetServerClientPtr client,
Unrelated whitespace change.
[...]
> +++ b/src/rpc/gendispatch.pl
> @@ -581,11 +599,11 @@ elsif ($mode eq "server") {
> " virObjectUnref(snapshot);\n" .
> " virObjectUnref(dom);");
> } elsif ($args_member =~ m/^(?:(?:admin|remote)_string|remote_uuid)
(\S+)<\S+>;/) {
> - push(@args_list, $conn) if !@args_list;
> + push(@args_list, "$conn_var") if !@args_list;
I don't speak Perl, so asking mostly out of curiosity: why is the
argument quoted now? Especially since...
> @@ -1095,7 +1105,7 @@ elsif ($mode eq "server") {
> } elsif (!$multi_ret) {
> my $proc_name = $call->{ProcName};
>
> - push(@args_list, $conn) if !@args_list;
> + push(@args_list, $conn_var) if !@args_list;
... this code looks like it's performing the same operation, yet the
argument is not quoted here, which leads me to believe one of the two
is not correct.
Both styles are functionally identical in their result. The quoted
form just adds wastefull string reallocation.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|