]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-ndisc: clean up state enum
authorTom Gundersen <teg@jklm.no>
Sun, 18 Oct 2015 15:13:03 +0000 (17:13 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 22 Oct 2015 15:19:54 +0000 (17:19 +0200)
There is no need to assign valuse to the states. Also add _INVALID and _MAX,
even though these are not used, it keeps it consistent.

src/libsystemd-network/sd-ndisc.c

index 92c872e16682100a83346dda43a6d19d8d96c15b..7921eb71a2637c4a485df2942fd8e5a69a0a979d 100644 (file)
 #define NDISC_MAX_ROUTER_SOLICITATIONS          3
 
 enum NDiscState {
-        NDISC_STATE_IDLE                       = 0,
-        NDISC_STATE_SOLICITATION_SENT          = 10,
-        NDISC_STATE_ADVERTISMENT_LISTEN        = 11,
+        NDISC_STATE_IDLE,
+        NDISC_STATE_SOLICITATION_SENT,
+        NDISC_STATE_ADVERTISMENT_LISTEN,
+        _NDISC_STATE_MAX,
+        _NDISC_STATE_INVALID = -1,
 };
 
 #define IP6_MIN_MTU (unsigned)1280