From 69356fabcb0c75db013255deee7edda8ec8024e5 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Fri, 1 Sep 2017 14:40:44 +0100 Subject: [PATCH] tests: Pass command list as constant Signed-off-by: Frediano Ziglio Acked-by: Jonathon Jongsma --- server/tests/test-display-base.c | 2 +- server/tests/test-display-base.h | 2 +- server/tests/test-display-no-ssl.c | 2 +- server/tests/test-two-servers.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c index 3a8d592e..2321ab05 100644 --- a/server/tests/test-display-base.c +++ b/server/tests/test-display-base.c @@ -864,7 +864,7 @@ void test_add_agent_interface(SpiceServer *server) spice_server_add_interface(server, &vdagent_sin.base); } -void test_set_simple_command_list(Test *test, int *simple_commands, int num_commands) +void test_set_simple_command_list(Test *test, const int *simple_commands, int num_commands) { int i; diff --git a/server/tests/test-display-base.h b/server/tests/test-display-base.h index f4231359..1a4f20c5 100644 --- a/server/tests/test-display-base.h +++ b/server/tests/test-display-base.h @@ -130,7 +130,7 @@ struct Test { void (*on_client_disconnected)(Test *test); }; -void test_set_simple_command_list(Test *test, int *command, int num_commands); +void test_set_simple_command_list(Test *test, const int *command, int num_commands); void test_set_command_list(Test *test, Command *command, int num_commands); void test_add_display_interface(Test *test); void test_add_agent_interface(SpiceServer *server); // TODO - Test *test diff --git a/server/tests/test-display-no-ssl.c b/server/tests/test-display-no-ssl.c index 01d1d03e..97673c99 100644 --- a/server/tests/test-display-no-ssl.c +++ b/server/tests/test-display-no-ssl.c @@ -42,7 +42,7 @@ static void pinger(SPICE_GNUC_UNUSED void *opaque) core->timer_start(ping_timer, ping_ms); } -int simple_commands[] = { +static const int simple_commands[] = { //SIMPLE_CREATE_SURFACE, //SIMPLE_DRAW, //SIMPLE_DESTROY_SURFACE, diff --git a/server/tests/test-two-servers.c b/server/tests/test-two-servers.c index 23cd7acd..8164df57 100644 --- a/server/tests/test-two-servers.c +++ b/server/tests/test-two-servers.c @@ -25,7 +25,7 @@ SpiceCoreInterface *core; -int simple_commands[] = { +static const int simple_commands[] = { //SIMPLE_CREATE_SURFACE, //SIMPLE_DRAW, //SIMPLE_DESTROY_SURFACE,