[spice-server] sasl: Simplify red_stream_write_u32_le call with '0' serveroutlen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of
if (serveroutlen) {
...
} else {
    red_stream_write_u32_le(stream, serveroutlen);
}

use 'red_stream_write_u32_le(stream, 0);' in the else block as it's
slightly more obvious.

Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>
---
 server/red-stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/red-stream.c b/server/red-stream.c
index fd5b8cd12..311387c25 100644
--- a/server/red-stream.c
+++ b/server/red-stream.c
@@ -903,7 +903,7 @@ static void red_sasl_handle_auth_step(void *opaque)
         red_stream_write_u32_le(stream, serveroutlen);
         red_stream_write_all(stream, serverout, serveroutlen);
     } else {
-        red_stream_write_u32_le(stream, serveroutlen);
+        red_stream_write_u32_le(stream, 0);
     }
 
     /* Whether auth is complete */
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]