On Tue, Sep 18, 2018 at 20:35:39 +0800, xiajidong(a)cmss.chinamobile.com wrote:
>From c013b053d7514ee66b841bc99900b06d1e9d4dfd Mon Sep 17 00:00:00
2001
From: xiajidong <xiajidong(a)cmss.chinamobile.com>
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