forked from Mirror/frr
watchfrr: Convert daemon_state_t to an enum instead of a typedef
Align watchfrr with our coding standard Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
f1692c510b
commit
c3db4ca8ed
|
@ -136,13 +136,13 @@ static struct global_state {
|
|||
.stop_command = DEFAULT_STOP_CMD,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
enum daemon_state {
|
||||
DAEMON_INIT,
|
||||
DAEMON_DOWN,
|
||||
DAEMON_CONNECTING,
|
||||
DAEMON_UP,
|
||||
DAEMON_UNRESPONSIVE
|
||||
} daemon_state_t;
|
||||
};
|
||||
|
||||
#define IS_UP(DMN) \
|
||||
(((DMN)->state == DAEMON_UP) || ((DMN)->state == DAEMON_UNRESPONSIVE))
|
||||
|
@ -153,7 +153,7 @@ static const char *const state_str[] = {
|
|||
|
||||
struct daemon {
|
||||
const char *name;
|
||||
daemon_state_t state;
|
||||
enum daemon_state state;
|
||||
int fd;
|
||||
struct timeval echo_sent;
|
||||
unsigned int connect_tries;
|
||||
|
|
Loading…
Reference in a new issue