Re: Subject: [PATCH] libvirt-domain.c:virDomainMigrateCheckNotLocal function

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

 



On Tue, Sep 18, 2018 at 20:35:39 +0800, xiajidong@xxxxxxxxxxxxxxxxxxxx wrote:
> >From c013b053d7514ee66b841bc99900b06d1e9d4dfd Mon Sep 17 00:00:00 2001
> From: xiajidong <xiajidong@xxxxxxxxxxxxxxxxxxxx>
> Date: Tue, 18 Sep 2018 08:04:20 -0400
> Subject: [PATCH] libvirt-domain.c:virDomainMigrateCheckNotLocal function
>  return bool instead of int type
> 
> the function of virDomainMigrateCheckNotLocal return bool should be more in
> line with specification,
> and use return is better than goto.

Thanks for the contribution, but the patch is not really needed.

Libvirt functions and especially those which can report an error
generally return int: 0 for success, -1 for error. So the existing code
is consistent with this.

Using a cleanup section with goto is much better than repeating the same
cleanup code several times. Thus the current code is fine, while your
change is not right.

Your patch would not apply because it was sent incorrectly. Please,
consult https://libvirt.org/hacking.html before submitting patches for
libvirt.

And please, follow the coding style (the indentation is wrong in several
places) and make sure you run "make check syntax-check" before
submitting patches (the code would not compile, because of "return ture").

NACK

Jirka

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