aboutsummaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2013-04-23 01:23:04 +0000
committerAlexander Graf <agraf@suse.de>2013-04-26 20:18:24 +0200
commitdc03640b5851d3115448493f0eee2b7f539de81a (patch)
treed89b031b04e79e5b53be6e89de64b7bd6b59d2d3 /pc-bios
parent6328801f19b08302377e812c454fd2b837f669e3 (diff)
s390-ccw.img: Fix compile warning in s390 ccw virtio code
Lets fix this gcc warning: virtio.c: In function ‘vring_send_buf’: virtio.c:125:35: error: operation on ‘vr->next_idx’ may be undefined [-Werror=sequence-point] Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/s390-ccw/virtio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index 79e2941618..1968fc6619 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -122,7 +122,9 @@ static void vring_send_buf(struct vring *vr, void *p, int len, int flags)
vr->desc[vr->next_idx].addr = (ulong)p;
vr->desc[vr->next_idx].len = len;
vr->desc[vr->next_idx].flags = flags & ~VRING_HIDDEN_IS_CHAIN;
- vr->desc[vr->next_idx].next = ++vr->next_idx;
+ vr->desc[vr->next_idx].next = vr->next_idx;
+ vr->desc[vr->next_idx].next++;
+ vr->next_idx++;
/* Chains only have a single ID */
if (!(flags & VRING_DESC_F_NEXT)) {