[libvirt] [PATCH v3 2/2] network: Add code for setting network bandwidth for ethernet interfaces

Eric Blake eblake at redhat.com
Fri Oct 10 18:13:54 UTC 2014


On 10/10/2014 10:59 AM, Anirban Chakraborty wrote:

> The list is really very long to put all in here. If we have to do what you
> suggested, then we’d be changing all such usage of switch statements,
> which is not trivial, I believe.

The point of adding it to HACKING is to encourage new code to abide by
the standard, and not necessarily to retrofit existing code.  And you
are correct that existing code doesn't always use enum type-safety
compiler guarantees - which makes the enum that much harder to modify
later if we ever add enum values.  But in some cases, it is fairly
obvious that we don't plan to add any enum values, in which case a
simple if statement or use of a default label is fine.  It's a
case-by-case judgment call of what makes the code easier to maintain.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141010/72dac6b5/attachment-0001.sig>


More information about the libvir-list mailing list