]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetDevParseMcast: Avoid magic constant
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 1 Aug 2015 05:43:58 +0000 (07:43 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 11 Aug 2015 14:10:32 +0000 (16:10 +0200)
commit327bc16a059f615e384376e73cc242d03fa897d9
tree89e16305ea6df59905d40b27ab3d7e771c2858e9
parent1f24c1494a85d663fa36047922a7974a292a46a7
virNetDevParseMcast: Avoid magic constant

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@redhat.com>
src/util/virnetdev.c