Skip to contentSkip to conversation

vnc: simple clean up

PATCH In review weiqi 2 participants 2 messages Apr 7, 2017

lore
Share & tools
lore

weiqi

author
#0 lore raw

PATCH 2/3 vnc: simple clean up

From: Wei Qi <[email protected]>

It is unnecessary to assign 'packed_bytes' to 'estimated_bytes', because 'estimated_bytes' unused after assignment.

---
 ui/vnc-enc-zrle.c | 1 -
 1 file changed, 1 deletion(-)
ui/vnc-enc-zrle.c +0 -1
index 5489870..fd63d4f 100644
@@ -163,7 +163,6 @@ static void zrle_choose_palette_rle(VncState *vs, int w, int h,
             if (packed_bytes < estimated_bytes) {
                 *use_rle = false;
                 *use_palette = true;
-                estimated_bytes = packed_bytes;
             }
         }
     }
Signature · 1 line
1.8.3.1
Reviewed-by on v1 2/3
#1 lore raw
Quoted 8 lines · weiqi

From: Wei Qi <[email protected]>

It is unnecessary to assign 'packed_bytes' to 'estimated_bytes', because 'estimated_bytes' unused after assignment.

---
 ui/vnc-enc-zrle.c | 1 -
 1 file changed, 1 deletion(-)

ui/vnc-enc-zrle.c static void zrle_choose_palette_rle(VncState *vs, int w, int h, · line 166

Quoted 10 lines
ui/vnc-enc-zrle.c +0 -1
index 5489870..fd63d4f 100644
@@ -163,7 +163,6 @@ static void zrle_choose_palette_rle(VncState *vs, int w, int h,
             if (packed_bytes < estimated_bytes) {
                 *use_rle = false;
                 *use_palette = true;
-                estimated_bytes = packed_bytes;

I verified that 'estimated_bytes' is well a local variable defined in 'zrle_choose_palette_rle(...)'.

Quoted 7 lines
ui/vnc-enc-zrle.c +0 -0
             }
         }
     }
Signature · 1 line
1.8.3.1