Allows the compiler to catch some additional errors. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/reds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/reds.c b/server/reds.c index 306bb7c6e..f27e28b9d 100644 --- a/server/reds.c +++ b/server/reds.c @@ -224,11 +224,11 @@ typedef struct RedVDIReadBuf { uint8_t data[SPICE_AGENT_MAX_DATA_SIZE]; } RedVDIReadBuf; -enum { +typedef enum { VDI_PORT_READ_STATE_READ_HEADER, VDI_PORT_READ_STATE_GET_BUFF, VDI_PORT_READ_STATE_READ_DATA, -}; +} VDIPortReadStates; struct RedCharDeviceVDIPortPrivate { gboolean agent_attached; @@ -242,7 +242,7 @@ struct RedCharDeviceVDIPortPrivate { /* read from agent */ uint32_t num_read_buf; - uint32_t read_state; + VDIPortReadStates read_state; uint32_t message_receive_len; uint8_t *receive_pos; uint32_t receive_len; -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel