diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-11-04 17:06:52 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2022-12-14 20:03:25 +0100 |
commit | 54fde4ff0621c22b15cbaaa3c74301cc0dbd1c9e (patch) | |
tree | 373c23134aab19ba0edf43249e7722eea1d01d14 /block/ssh.c | |
parent | 8461b4d60153ba923c47b6e2f9e270c0e8d6d49c (diff) | |
download | qemu-54fde4ff0621c22b15cbaaa3c74301cc0dbd1c9e.zip qemu-54fde4ff0621c22b15cbaaa3c74301cc0dbd1c9e.tar.gz qemu-54fde4ff0621c22b15cbaaa3c74301cc0dbd1c9e.tar.bz2 |
qapi block: Elide redundant has_FOO in generated C
The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with. Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step. This is the step for qapi/block*.json.
Said commit explains the transformation in more detail.
There is one instance of the invariant violation mentioned there:
qcow2_signal_corruption() passes false, "" when node_name is an empty
string. Take care to pass NULL then.
The previous two commits cleaned up two more.
Additionally, helper bdrv_latency_histogram_stats() loses its output
parameters and returns a value instead.
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-11-armbru@redhat.com>
[Fixes for #ifndef LIBRBD_SUPPORTS_ENCRYPTION and MacOS squashed in]
Diffstat (limited to 'block/ssh.c')
-rw-r--r-- | block/ssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/ssh.c b/block/ssh.c index 04726d4..8508710 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -643,7 +643,7 @@ static int connect_to_ssh(BDRVSSHState *s, BlockdevOptionsSsh *opts, unsigned int port = 0; int new_sock = -1; - if (opts->has_user) { + if (opts->user) { s->user = g_strdup(opts->user); } else { s->user = g_strdup(g_get_user_name()); |