mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
reds: Use proper enumeration for read_state field
Allows the compiler to catch some additional errors. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
a8737c5740
commit
9fec0306f2
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user