[Spice-devel] [PATCH spice-xpi] controller: initialize correctly Connect() loop condition
Marc-André Lureau
marcandre.lureau at gmail.com
Sun Jun 5 16:52:08 PDT 2011
Ping! can somebody review? it shouldn't take too long.
On Tue, May 24, 2011 at 10:12 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> Without initialization of rc, it may happen connection with controller
> socket just don't happen and the client will wait hanging...
> ---
> SpiceXPI/src/plugin/controller.cpp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
> index a3edccb..3a78b5c 100644
> --- a/SpiceXPI/src/plugin/controller.cpp
> +++ b/SpiceXPI/src/plugin/controller.cpp
> @@ -125,7 +125,7 @@ int SpiceController::Connect(const int nRetries)
> if (nRetries < 0)
> return -1;
>
> - int rc;
> + int rc = -1;
> int sleep_time = 0;
>
> // try to connect for specified count
> --
> 1.7.5.1
>
>
--
Marc-André Lureau
More information about the Spice-devel
mailing list