mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qdev: Constify value passed to qdev_prop_set_macaddr
The 'value' argument is not modified so this can be made const for code safeness. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Message-Id: <20170310200550.13313-2-krzk@kernel.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
6f4c60e47f
commit
606fd0e206
2 changed files with 4 additions and 2 deletions
|
@ -1010,7 +1010,8 @@ void qdev_prop_set_string(DeviceState *dev, const char *name, const char *value)
|
|||
object_property_set_str(OBJECT(dev), value, name, &error_abort);
|
||||
}
|
||||
|
||||
void qdev_prop_set_macaddr(DeviceState *dev, const char *name, uint8_t *value)
|
||||
void qdev_prop_set_macaddr(DeviceState *dev, const char *name,
|
||||
const uint8_t *value)
|
||||
{
|
||||
char str[2 * 6 + 5 + 1];
|
||||
snprintf(str, sizeof(str), "%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue