Revision a0c8699b hw/s390x/event-facility.c

b/hw/s390x/event-facility.c
183 183
{
184 184
    uint16_t rc;
185 185
    int slen;
186
    unsigned elen = 0;
186
    unsigned elen;
187 187
    BusChild *kid;
188 188
    SCLPEvent *event;
189 189
    SCLPEventClass *ec;
......
203 203

  
204 204
        if (mask & ec->get_send_mask()) {
205 205
            if (ec->read_event_data(event, event_buf, &slen)) {
206
                elen = be16_to_cpu(event_buf->length);
207
                event_buf = (EventBufferHeader *) ((char *)event_buf + elen);
206 208
                rc = SCLP_RC_NORMAL_COMPLETION;
207 209
            }
208 210
        }
209
        elen = be16_to_cpu(event_buf->length);
210
        event_buf = (void *) event_buf + elen;
211 211
    }
212 212

  
213 213
    if (sccb->h.control_mask[2] & SCLP_VARIABLE_LENGTH_RESPONSE) {

Also available in: Unified diff