aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:35:52 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-04-25 18:35:52 +0000
commit9678d9501bc5f2e6e06170013dec8667057c3b62 (patch)
tree98a3d703b5db9b598a639fa672bbe159a85b07c4 /vnc.c
parentd4c4e6fdc7f5077fba3446f6e650eb94d07a0be5 (diff)
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/vnc.c b/vnc.c
index 9ba603c690..d332099ffd 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1234,17 +1234,16 @@ static long vnc_client_write_plain(VncState *vs)
*/
void vnc_client_write(void *opaque)
{
- long ret;
VncState *vs = opaque;
#ifdef CONFIG_VNC_SASL
if (vs->sasl.conn &&
vs->sasl.runSSF &&
- !vs->sasl.waitWriteSSF)
- ret = vnc_client_write_sasl(vs);
- else
+ !vs->sasl.waitWriteSSF) {
+ vnc_client_write_sasl(vs);
+ } else
#endif /* CONFIG_VNC_SASL */
- ret = vnc_client_write_plain(vs);
+ vnc_client_write_plain(vs);
}
void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting)
@@ -1725,12 +1724,8 @@ static void framebuffer_update_request(VncState *vs, int incremental,
int x_position, int y_position,
int w, int h)
{
- if (x_position > ds_get_width(vs->ds))
- x_position = ds_get_width(vs->ds);
if (y_position > ds_get_height(vs->ds))
y_position = ds_get_height(vs->ds);
- if (x_position + w >= ds_get_width(vs->ds))
- w = ds_get_width(vs->ds) - x_position;
if (y_position + h >= ds_get_height(vs->ds))
h = ds_get_height(vs->ds) - y_position;