[Spice-devel] [PATCH 3/8] Constify spice_server_char_device_recognized_subtypes
Frediano Ziglio
fziglio at redhat.com
Mon Jun 20 09:15:07 UTC 2016
Users should not change the list of supported subtypes.
This could break the API but not the ABI.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds.c | 4 ++--
server/spice-char.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/reds.c b/server/reds.c
index b2438f6..3f33c32 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3150,7 +3150,7 @@ SPICE_GNUC_VISIBLE void spice_server_char_device_wakeup(SpiceCharDeviceInstance*
#define SUBTYPE_USBREDIR "usbredir"
#define SUBTYPE_PORT "port"
-static const char *spice_server_char_device_recognized_subtypes_list[] = {
+static const char *const spice_server_char_device_recognized_subtypes_list[] = {
SUBTYPE_VDAGENT,
#ifdef USE_SMARTCARD
SUBTYPE_SMARTCARD,
@@ -3159,7 +3159,7 @@ static const char *spice_server_char_device_recognized_subtypes_list[] = {
NULL,
};
-SPICE_GNUC_VISIBLE const char** spice_server_char_device_recognized_subtypes(void)
+SPICE_GNUC_VISIBLE const char* const* spice_server_char_device_recognized_subtypes(void)
{
return spice_server_char_device_recognized_subtypes_list;
}
diff --git a/server/spice-char.h b/server/spice-char.h
index efd685d..e0348c2 100644
--- a/server/spice-char.h
+++ b/server/spice-char.h
@@ -56,6 +56,6 @@ struct SpiceCharDeviceInstance {
void spice_server_char_device_wakeup(SpiceCharDeviceInstance *sin);
void spice_server_port_event(SpiceCharDeviceInstance *char_device, uint8_t event);
-const char** spice_server_char_device_recognized_subtypes(void);
+const char* const* spice_server_char_device_recognized_subtypes(void);
#endif /* SPICE_CHAR_H_ */
--
2.7.4
More information about the Spice-devel
mailing list