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

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

 



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

Attachment: signature.asc
Description: OpenPGP digital 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]