[Spice-devel] [PATCH spice-streaming-agent] Make evaluation order more readable

Victor Toso victortoso at redhat.com
Mon Feb 19 13:36:01 UTC 2018


On Mon, Feb 19, 2018 at 01:26:01PM +0000, Frediano Ziglio wrote:
> As a first sight the XXX = YYY != 0 syntax can be confusing,
> add parenthesis to make clear the order.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>

> ---
>  src/spice-streaming-agent.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
> index 4ec5e42..e01de6c 100644
> --- a/src/spice-streaming-agent.cpp
> +++ b/src/spice-streaming-agent.cpp
> @@ -112,7 +112,7 @@ static int read_command_from_device(void)
>                 n, hdr.size);
>          return -1;
>      }
> -    streaming_requested = msg[0] != 0; /* num_codecs */
> +    streaming_requested = (msg[0] != 0); /* num_codecs */
>      syslog(LOG_INFO, "GOT START_STOP message -- request to %s streaming\n",
>             streaming_requested ? "START" : "STOP");
>      client_codecs.clear();
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180219/72dbcd5d/attachment.sig>


More information about the Spice-devel mailing list