[libvirt] [PATCH 1 of 3] [LXC] Add functions to manage veth device pairs
Dan Smith
danms at us.ibm.com
Mon Jun 23 18:11:45 UTC 2008
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 at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080623/84e1d024/attachment-0001.sig>
More information about the libvir-list
mailing list