]> git.proxmox.com Git - qemu.git/commit - ui/vnc-auth-sasl.c
vnc: Fix packed boolean struct members
authorStefan Weil <sw@weilnetz.de>
Thu, 8 Mar 2012 21:58:06 +0000 (22:58 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 19 Mar 2012 10:52:52 +0000 (10:52 +0000)
commitee032ca146e932ce616aff7762596a10bf24ecac
treefdb3795a677d6e6825506d82b3564709d61da580
parentb920df5c79f64fe9617ef070cd6bda1738172f84
vnc: Fix packed boolean struct members

This patch fixes warnings reported by splint:

For variables which are packed in a single bit, a signed data type
like 'int' does not make much sense.

There is no obvious reason why the two values should be packed,
so I removed the packing and changed the data type to bool
because both are used as boolean values.

v2:

Some versions of gcc complain after this modification,
for example gcc (Debian 4.4.5-8) 4.4.5):

ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’:
ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value

Obviously, the compiler does not like code which does
bool = unsigned = bool = 0

Splitting that code in three statements works.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
ui/vnc-auth-sasl.c
ui/vnc-auth-sasl.h