[Spice-commits] server/dcc.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Mon Feb 27 12:01:41 UTC 2017
server/dcc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit be727eb822d5c7031aacae91822758775b640f04
Author: Christophe de Dinechin <dinechin at redhat.com>
Date: Mon Feb 27 12:55:13 2017 +0100
Remove X == TRUE tests for non-boolean values
Using X == TRUE is fragile, since the input value is a uint8_t. It would be
surprising if the value was set to 2 or 0xFF and the test failed.
Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/dcc.c b/server/dcc.c
index cf9431a..373dad9 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -398,7 +398,7 @@ static void add_drawable_surface_images(DisplayChannelClient *dcc, Drawable *dra
surface_id = drawable->surface_deps[x];
if (surface_id != -1) {
- if (dcc->priv->surface_client_created[surface_id] == TRUE) {
+ if (dcc->priv->surface_client_created[surface_id]) {
continue;
}
dcc_create_surface(dcc, surface_id);
@@ -407,7 +407,7 @@ static void add_drawable_surface_images(DisplayChannelClient *dcc, Drawable *dra
}
}
- if (dcc->priv->surface_client_created[drawable->surface_id] == TRUE) {
+ if (dcc->priv->surface_client_created[drawable->surface_id]) {
return;
}
More information about the Spice-commits
mailing list