Re: [libvirt] [PATCH 1 of 3] [LXC] Add functions to manage veth device pairs

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

 



JM> However, argv is one place where it pays to relax
JM> const-correctness guidelines, at least in C, because so many
JM> interfaces require non-const "char **argv" pointers.  IMHO, it's
JM> better to avoid const altogether in this limited case than to be
JM> forced to litter the code with ugly and dangerous const-adjusting
JM> casts to accommodate "correctness".

I agree with the last statement, but in this case, leaving the const
off the declaration results in a compiler warning about discarding the
inherent const qualifier from a literal string.

A *very* quick look in src/*.c doesn't reveal any other examples of
all-literal argv[] lists like this.  I'm inclined to leave the const
and the cast, but if you have a better suggestion, I'll be glad to
make the change.

Thanks!

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx

Attachment: pgpjmugV34gey.pgp
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]