]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Remove the typedef for zfrpm_state_t
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 7 May 2020 12:38:35 +0000 (08:38 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 8 May 2020 12:08:04 +0000 (08:08 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zebra_fpm.c

index db256390444c84afae54479a08a201ed8d08a1fa..25c7e923a01550c34f5273adb28a4d6e0d8fbc55 100644 (file)
@@ -120,7 +120,7 @@ struct zfpm_stats {
 /*
  * States for the FPM state machine.
  */
-typedef enum {
+enum zfpm_state {
 
        /*
         * In this state we are not yet ready to connect to the FPM. This
@@ -146,7 +146,7 @@ typedef enum {
         */
        ZFPM_STATE_ESTABLISHED
 
-} zfpm_state_t;
+};
 
 /*
  * Message format to be used to communicate with the FPM.
@@ -173,7 +173,7 @@ typedef struct zfpm_glob_t_ {
 
        struct thread_master *master;
 
-       zfpm_state_t state;
+       enum zfpm_state state;
 
        in_addr_t fpm_server;
        /*
@@ -283,7 +283,7 @@ static int zfpm_trigger_update(struct route_node *rn, const char *reason);
 static int zfpm_read_cb(struct thread *thread);
 static int zfpm_write_cb(struct thread *thread);
 
-static void zfpm_set_state(zfpm_state_t state, const char *reason);
+static void zfpm_set_state(enum zfpm_state state, const char *reason);
 static void zfpm_start_connect_timer(const char *reason);
 static void zfpm_start_stats_timer(void);
 static void zfpm_mac_info_del(struct fpm_mac_info_t *fpm_mac);
@@ -299,7 +299,7 @@ static inline int zfpm_thread_should_yield(struct thread *t)
 /*
  * zfpm_state_to_str
  */
-static const char *zfpm_state_to_str(zfpm_state_t state)
+static const char *zfpm_state_to_str(enum zfpm_state state)
 {
        switch (state) {
 
@@ -1310,9 +1310,9 @@ static int zfpm_connect_cb(struct thread *t)
  *
  * Move state machine into the given state.
  */
-static void zfpm_set_state(zfpm_state_t state, const char *reason)
+static void zfpm_set_state(enum zfpm_state state, const char *reason)
 {
-       zfpm_state_t cur_state = zfpm_g->state;
+       enum zfpm_state cur_state = zfpm_g->state;
 
        if (!reason)
                reason = "Unknown";