From 80e5db303dc82e357df923dc2bfcb858c20282a0 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 18 Jan 2017 18:13:20 +0100 Subject: machine: Make possible_cpu_arch_ids() return const pointer make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by: Igor Mammedov Message-Id: <1484759609-264075-5-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- include/hw/boards.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/boards.h') diff --git a/include/hw/boards.h b/include/hw/boards.h index a51da9c440..ac891a828b 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -135,7 +135,7 @@ struct MachineClass { HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev); unsigned (*cpu_index_to_socket_id)(unsigned cpu_index); - CPUArchIdList *(*possible_cpu_arch_ids)(MachineState *machine); + const CPUArchIdList *(*possible_cpu_arch_ids)(MachineState *machine); HotpluggableCPUList *(*query_hotpluggable_cpus)(MachineState *machine); }; -- cgit v1.2.3