From 6530ca62da360da2371d531f901b465d16f68ded Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Tue, 17 Dec 2019 22:08:27 +0100 Subject: [PATCH] [client] fix return value in spice_read_nl error path Returning -1 from a function with bool as return argument is the same as returning true. If the channel is not connected, return false instead to indicate the error. --- client/spice/src/spice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/spice/src/spice.c b/client/spice/src/spice.c index c5f53d52..cd253596 100644 --- a/client/spice/src/spice.c +++ b/client/spice/src/spice.c @@ -1286,7 +1286,7 @@ bool spice_read_nl(const struct SpiceChannel * channel, void * buffer, const ssi if (!channel->connected) { DEBUG_ERROR("not connected"); - return -1; + return false; } if (!buffer)