From 44138137bb2d15362c67056685a3e6caccbb0918 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 23 Oct 2019 00:19:22 +0200 Subject: Binder.c: scope improvements --- nx-X11/programs/Xserver/hw/nxagent/Binder.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Binder.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Binder.c b/nx-X11/programs/Xserver/hw/nxagent/Binder.c index 1a6c4e969..247fb9d77 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Binder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Binder.c @@ -46,19 +46,14 @@ int nxagentCheckBinder(int argc, char *argv[], int i) { if (++i < argc) { - char *display; - char *found; - - int port; - - display = argv[i]; + char *display = argv[i]; /* * Check if a display specification follows * the -B switch. */ - found = rindex(display, ':'); + char *found = rindex(display, ':'); if (found == NULL || *(found + 1) == '\0' || isdigit(*(found + 1)) == 0) @@ -69,7 +64,7 @@ int nxagentCheckBinder(int argc, char *argv[], int i) return 0; } - port = atoi(found + 1); + int port = atoi(found + 1); #ifdef TEST fprintf(stderr, "nxagentCheckBinder: Identified agent display port [%d].\n", -- cgit v1.2.3 From 8b796ee54b2b750c81d987637e9fb2ef2f871c76 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 23 Oct 2019 00:19:09 +0200 Subject: Binder.c: reformat comments --- nx-X11/programs/Xserver/hw/nxagent/Binder.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Binder.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Binder.c b/nx-X11/programs/Xserver/hw/nxagent/Binder.c index 247fb9d77..518c016c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Binder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Binder.c @@ -49,8 +49,7 @@ int nxagentCheckBinder(int argc, char *argv[], int i) char *display = argv[i]; /* - * Check if a display specification follows - * the -B switch. + * Check if a display specification follows the -B switch. */ char *found = rindex(display, ':'); @@ -73,8 +72,8 @@ int nxagentCheckBinder(int argc, char *argv[], int i) /* * The NX options must be specified in the DISPLAY - * environment. Check if the display specified on - * the command line matches the NX virtual display. + * environment. Check if the display specified on the command line + * matches the NX virtual display. */ display = getenv("DISPLAY"); @@ -103,8 +102,8 @@ int nxagentCheckBinder(int argc, char *argv[], int i) #endif /* - * Save the proxy options. They will be later - * used to create the transport. + * Save the proxy options. They will be later used to create the + * transport. */ nxagentChangeOption(Rootless, False); @@ -112,10 +111,9 @@ int nxagentCheckBinder(int argc, char *argv[], int i) nxagentChangeOption(Binder, True); /* - * FIXME: This now points to the buffer that was - * returned by getenv(). It is to be decided how - * to handle the values of type string in the - * Options repository. + * FIXME: This now points to the buffer that was returned by + * getenv(). It is to be decided how to handle the values of type + * string in the Options repository. */ nxagentChangeOption(BinderOptions, display); -- cgit v1.2.3