[Spice-devel] [PATCH spice-gtk 2/9] smartcard_message_complete_in_flight cleanup error checking
Hans de Goede
hdegoede at redhat.com
Wed Dec 14 06:14:02 PST 2011
smartcard_message_complete_in_flight should never get called if there
is no message in flight (priv->in_flight_message != NULL).
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
gtk/channel-smartcard.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/gtk/channel-smartcard.c b/gtk/channel-smartcard.c
index f376e53..64fc06e 100644
--- a/gtk/channel-smartcard.c
+++ b/gtk/channel-smartcard.c
@@ -264,10 +264,7 @@ smartcard_message_new(VSCMsgType msg_type, SpiceMsgOut *msg_out)
static void
smartcard_message_complete_in_flight(SpiceSmartcardChannel *channel)
{
- if (channel->priv->in_flight_message == NULL) {
- g_return_if_fail(g_queue_is_empty(channel->priv->message_queue));
- return;
- }
+ g_return_if_fail(channel->priv->in_flight_message != NULL);
smartcard_message_free(channel->priv->in_flight_message);
channel->priv->in_flight_message = g_queue_pop_head(channel->priv->message_queue);
--
1.7.7.4
More information about the Spice-devel
mailing list