[spice-server] dcc-send: Check some constants at compile time

Submitted by Frediano Ziglio on June 21, 2019, 9:45 a.m.

Details

Message ID 20190621094509.2212-1-fziglio@redhat.com
State Accepted
Commit 11b0a58bbf53cad343f5f5047ebc73c4ee64adc9
Headers show
Series "dcc-send: Check some constants at compile time" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio June 21, 2019, 9:45 a.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/dcc-send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/server/dcc-send.c b/server/dcc-send.c
index ea2128e27..b14619a2b 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -1834,7 +1834,7 @@  static void display_channel_marshall_migrate_data(RedChannelClient *rcc,
     spice_marshaller_add_uint32(base_marshaller, SPICE_MIGRATE_DATA_DISPLAY_VERSION);
 
     spice_assert(dcc->priv->pixmap_cache);
-    spice_assert(MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == 4 &&
+    SPICE_VERIFY(MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == 4 &&
                  MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == MAX_CACHE_CLIENTS);
 
     display_data.message_serial = red_channel_client_get_message_serial(rcc);

Comments

On 6/21/19 12:45 PM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

Ack.

Uri.

> ---
>   server/dcc-send.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/dcc-send.c b/server/dcc-send.c
> index ea2128e27..b14619a2b 100644
> --- a/server/dcc-send.c
> +++ b/server/dcc-send.c
> @@ -1834,7 +1834,7 @@ static void display_channel_marshall_migrate_data(RedChannelClient *rcc,
>       spice_marshaller_add_uint32(base_marshaller, SPICE_MIGRATE_DATA_DISPLAY_VERSION);
>   
>       spice_assert(dcc->priv->pixmap_cache);
> -    spice_assert(MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == 4 &&
> +    SPICE_VERIFY(MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == 4 &&
>                    MIGRATE_DATA_DISPLAY_MAX_CACHE_CLIENTS == MAX_CACHE_CLIENTS);
>   
>       display_data.message_serial = red_channel_client_get_message_serial(rcc);
>