diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2012-11-23 00:18:12 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-11-26 20:16:26 +0100 |
commit | 773de5c786a6050bbf3b33c0e29d1bd519a40b4b (patch) | |
tree | b5173183b5c09b47b0f759e4abc18a733ab19647 /hw/s390x/event-facility.c | |
parent | 8c7c3c58e3e33c80d1eef1514db3c705a4de692e (diff) |
sclp: Fix uninitialized var in handle_write_event_buf().
Some gcc versions rightly complain about a possibly unitialized rc,
so let's move setting it before the QTAILQ_FOREACH().
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390x/event-facility.c')
-rw-r--r-- | hw/s390x/event-facility.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 93676602a7..bc9cea9e1b 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -112,12 +112,13 @@ static uint16_t handle_write_event_buf(SCLPEventFacility *ef, SCLPEvent *event; SCLPEventClass *ec; + rc = SCLP_RC_INVALID_FUNCTION; + QTAILQ_FOREACH(kid, &ef->sbus.qbus.children, sibling) { DeviceState *qdev = kid->child; event = (SCLPEvent *) qdev; ec = SCLP_EVENT_GET_CLASS(event); - rc = SCLP_RC_INVALID_FUNCTION; if (ec->write_event_data && ec->event_type() == event_buf->type) { rc = ec->write_event_data(event, event_buf); |