Re: [PATCH 34/41] remote: change generated methods to not directly access connection

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

 



On Mon, 2019-07-29 at 14:33 +0100, Daniel P. Berrangé wrote:
> 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/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.

Alright, can you standardize on the non-quoted style before pushing
then?

-- 
Andrea Bolognani / Red Hat / Virtualization

--
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]

  Powered by Linux