Re: [PATCH 03/10] conf: domaincaps: Fix broken attempt at being const-correct

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

 



On Tue, Nov 12, 2019 at 09:30:14AM +0000, Daniel P. Berrangé wrote:
On Tue, Nov 12, 2019 at 08:27:40AM +0100, Peter Krempa wrote:
'virBlahPtr const blah' results into modification to the value of 'blah'
triggering compilation error rather than the modification of the virBlah
struct the pointer points to.

Shall we add a syntax check rule to forbid "virFOOPtr const", and
"const virFOOPtr".


We already do have a rule against const virFOOPtr.

Jano

Indeed, I rather wish we never had the "Ptr" suffix at all, and
just used a "*" normally, but that would be a too huge change.


All of the domain capability formatting code was broken in this regard.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_capabilities.c | 32 ++++++++++++++++----------------
 src/conf/domain_capabilities.h |  4 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)

Attachment: signature.asc
Description: PGP signature

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