diff mbox

[v2,1/5] vnc: pass bool parameter for some functions

Message ID 1371527137-16949-1-git-send-email-lig.fnst@cn.fujitsu.com
State New
Headers show

Commit Message

liguang June 18, 2013, 3:45 a.m. UTC
last parameters of vnc_listen_read,vnc_connect are bool,
so pass 'false/true' instead of '0/1' for them.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
 ui/vnc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Comments

Michael Tokarev June 19, 2013, 8:17 a.m. UTC | #1
18.06.2013 07:45, liguang wrote:
> last parameters of vnc_listen_read,vnc_connect are bool,
> so pass 'false/true' instead of '0/1' for them.
> 
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>

I think I'll apply my version instead, -- which converts remaining arguments
of functions your patch touches (so that we don't have this:

> -        vnc_connect(vs, csock, 0, 0);
> +        vnc_connect(vs, csock, 0, false);

where 3rd argument is also a bool), and which combines your patches 1/5
and 2/5 into one.

I'll resend it again in a top-level message.

Thanks,

/mjt
diff mbox

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index dfc7459..1a8b940 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2889,13 +2889,13 @@  static void vnc_listen_read(void *opaque, bool websocket)
 
 static void vnc_listen_regular_read(void *opaque)
 {
-    vnc_listen_read(opaque, 0);
+    vnc_listen_read(opaque, false);
 }
 
 #ifdef CONFIG_VNC_WS
 static void vnc_listen_websocket_read(void *opaque)
 {
-    vnc_listen_read(opaque, 1);
+    vnc_listen_read(opaque, true);
 }
 #endif /* CONFIG_VNC_WS */
 
@@ -3283,7 +3283,7 @@  void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
         if (csock < 0) {
             goto fail;
         }
-        vnc_connect(vs, csock, 0, 0);
+        vnc_connect(vs, csock, 0, false);
     } else {
         /* listen for connects */
         char *dpy;
@@ -3345,5 +3345,5 @@  void vnc_display_add_client(DisplayState *ds, int csock, int skipauth)
 {
     VncDisplay *vs = vnc_display;
 
-    vnc_connect(vs, csock, skipauth, 0);
+    vnc_connect(vs, csock, skipauth, false);
 }