reds: Fix wrong assert

RedVDIReadBuf::data is a static allocated buffer so checking for
NULL on it is useless. It would be NULL only if RedVDIReadBuf
pointer would be the opposite, in value, of the offset of
data field into it.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-12-02 15:59:48 +00:00
parent ecd9968e91
commit 89c5d062d6

View File

@ -1242,7 +1242,7 @@ void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc)
if (agent_dev->priv->read_state != VDI_PORT_READ_STATE_READ_DATA) {
return;
}
spice_assert(agent_dev->priv->current_read_buf->data &&
spice_assert(agent_dev->priv->current_read_buf &&
agent_dev->priv->receive_pos > agent_dev->priv->current_read_buf->data);
read_data_len = agent_dev->priv->receive_pos - agent_dev->priv->current_read_buf->data;