]> git.proxmox.com Git - mirror_qemu.git/commit - util/qemu-sockets.c
util: Shorten references into SocketAddress
authorEric Blake <eblake@redhat.com>
Thu, 3 Mar 2016 16:16:48 +0000 (09:16 -0700)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 5 Mar 2016 09:41:52 +0000 (10:41 +0100)
commit0399293e5b9e5443b82103fa8e2c97deadef9825
tree51743f16ff479c5e1ff013f7d4a9176b4a9609b8
parentf194a1ae530e232b994d23aa8651696dd6664b5d
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>
block/nbd.c
qemu-char.c
qemu-nbd.c
tests/test-io-channel-socket.c
ui/vnc.c
util/qemu-sockets.c