util: Shorten references into SocketAddress
An upcoming patch will alter how simple unions, like SocketAddress, are laid out, which will impact all lines of the form 'addr->u.XXX' (expanding it to the longer 'addr->u.XXX.data'). For better legibility in that patch, and less need for line wrapping, it's better to use a temporary variable to reduce the effect of a layout change to just the variable initializations, rather than every reference within a SocketAddress. Also, take advantage of some C99 initialization where it makes sense (simplifying g_new0() to g_new()). Signed-off-by:Eric Blake <eblake@redhat.com> Message-Id: <1457021813-10704-7-git-send-email-eblake@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
Showing
- block/nbd.c 8 additions, 6 deletionsblock/nbd.c
- qemu-char.c 28 additions, 21 deletionsqemu-char.c
- qemu-nbd.c 5 additions, 4 deletionsqemu-nbd.c
- tests/test-io-channel-socket.c 21 additions, 13 deletionstests/test-io-channel-socket.c
- ui/vnc.c 20 additions, 19 deletionsui/vnc.c
- util/qemu-sockets.c 6 additions, 5 deletionsutil/qemu-sockets.c
Loading
Please register or sign in to comment