Patchwork [04/20] qdev-properties: parse_enum: don't cast a void*

login
register
mail settings
Submitter Alon Levy
Date Feb. 2, 2011, 8:28 p.m.
Message ID <1296678500-19497-5-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/81560/
State New
Headers show

Comments

Alon Levy - Feb. 2, 2011, 8:28 p.m.
---
 hw/qdev-properties.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 3157721..9108f18 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -75,7 +75,7 @@  DEFINE_PROP_ENUM("foo", State, foo, 1, foo_enum_table),
 static int parse_enum(DeviceState *dev, Property *prop, const char *str)
 {
     uint8_t *ptr = qdev_get_prop_ptr(dev, prop);
-    EnumTable *option = (EnumTable*)prop->data;
+    EnumTable *option = prop->data;
 
     while (option->name != NULL) {
         if (!strncmp(str, option->name, strlen(option->name))) {