diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-01-10 11:36:47 +0000 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-01-13 18:11:58 +0200 |
commit | d262f1d96e7ac519c48914c6899309c135ac8276 (patch) | |
tree | 0af9594c696aa6c2d594f5adea39d82b460ceb6e /server | |
parent | faf0947ebbcdbd2088d6349e936a23b24d09153b (diff) | |
download | spice-d262f1d96e7ac519c48914c6899309c135ac8276.tar.gz spice-d262f1d96e7ac519c48914c6899309c135ac8276.tar.xz spice-d262f1d96e7ac519c48914c6899309c135ac8276.zip |
Rewrite code to avoid triggering warning about casting param to free()
Since free() takes a void* parameters do not need to be cast.
The existing code here is actally fine, but it trips up the
syntax-check rule, so tweak it to an equivalent construct
which passes the syntax check
Diffstat (limited to 'server')
-rw-r--r-- | server/smartcard.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/smartcard.c b/server/smartcard.c index 43ca1ac4..facc4b37 100644 --- a/server/smartcard.c +++ b/server/smartcard.c @@ -335,7 +335,8 @@ static void smartcard_channel_release_pipe_item(RedChannelClient *rcc, PipeItem *item, int item_pushed) { if (item->type == PIPE_ITEM_TYPE_MSG) { - free(((MsgItem*)item)->vheader); + MsgItem *mi = (MsgItem *)item; + free(mi->vheader); } free(item); } |