[libvirt] [PATCH 1/9] virNetDevParseMcast: Avoid magic constant

John Ferlan jferlan at redhat.com
Tue Aug 11 01:32:38 UTC 2015



On 08/03/2015 02:39 AM, Michal Privoznik wrote:
> There is no guarantee that an enum start it mapped onto a value
> of zero. However, we are guaranteed that enum items are
> consecutive integers. Moreover, it's a pity to define an enum to
> avoid using magical constants but then using them anyway.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/util/virnetdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

ACK

John




More information about the libvir-list mailing list