]> Git Repo - qemu.git/commit
vhost-user-bridge: fix iov_restore_front() warning
authorMarc-André Lureau <[email protected]>
Fri, 2 Jun 2017 08:15:19 +0000 (12:15 +0400)
committerMichael S. Tsirkin <[email protected]>
Thu, 8 Jun 2017 19:02:36 +0000 (22:02 +0300)
commit277238f9f41e0a429a24b05c03f3010b35c3e9d0
tree49836de6e617ae77f10ac9cd7d35f3b424dbd4b4
parent64175afc695c0672876fbbfc31b299c86d562cb4
vhost-user-bridge: fix iov_restore_front() warning

  CC      tests/vhost-user-bridge.o
/home/dgilbert/git/qemu-world3/tests/vhost-user-bridge.c:228:23: warning: variables 'front' and 'iov' used in loop condition not modified in loop body [-Wfor-loop-analysis]
    for (cur = front; front != iov; cur++) {
                      ^~~~~    ~~~
1 warning generated.

Fix the loop, document the function, and fix some related assert().

In practice, the loop bug was harmless because the front sg buffer is
enough to discard/restore the header size.

Reported-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Tested-by: Jens Freimann <[email protected]>
tests/vhost-user-bridge.c
This page took 0.021363 seconds and 4 git commands to generate.