virtio-net: remove function calls from assert
commitddfa83ea06680e83643978f6ecf740b60f86f7c2
authorJoel Stanley <joel@jms.id.au>
Tue, 11 Feb 2014 00:12:02 +0000 (11 10:42 +1030)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 9 Mar 2014 19:09:37 +0000 (9 21:09 +0200)
treed60c44ac2cc0318b65fd9fc07ceb9d9b770a897c
parent6cb46e1e900a05dea1734a6cbe81c0c1ecb2f2cb
virtio-net: remove function calls from assert

peer_{de,at}tach were called from inside assert().
We don't support building without NDEBUG but it's not tidy.
Rearrange to attach peer outside assert calls.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/virtio-net.c