diff options
| author | Stefan Weil <sw@weilnetz.de> | 2012-03-08 22:58:06 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-03-19 10:52:52 +0000 |
| commit | ee032ca146e932ce616aff7762596a10bf24ecac (patch) | |
| tree | fdb3795a677d6e6825506d82b3564709d61da580 /ui/vnc-auth-sasl.h | |
| parent | b920df5c79f64fe9617ef070cd6bda1738172f84 (diff) | |
| download | focaccia-qemu-ee032ca146e932ce616aff7762596a10bf24ecac.tar.gz focaccia-qemu-ee032ca146e932ce616aff7762596a10bf24ecac.zip | |
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>
Diffstat (limited to 'ui/vnc-auth-sasl.h')
| -rw-r--r-- | ui/vnc-auth-sasl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/vnc-auth-sasl.h b/ui/vnc-auth-sasl.h index fd9b18a8fe..ee243a9d64 100644 --- a/ui/vnc-auth-sasl.h +++ b/ui/vnc-auth-sasl.h @@ -37,9 +37,9 @@ typedef struct VncDisplaySASL VncDisplaySASL; struct VncStateSASL { sasl_conn_t *conn; /* If we want to negotiate an SSF layer with client */ - int wantSSF :1; + bool wantSSF; /* If we are now running the SSF layer */ - int runSSF :1; + bool runSSF; /* * If this is non-zero, then wait for that many bytes * to be written plain, before switching to SSF encoding |