diff options
author | Salvador Fandino <salvador@qindel.com> | 2020-01-23 20:36:26 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-01-30 21:33:50 +0000 |
commit | e144a605a614d22165000c69e8e1dc6986d45cd8 (patch) | |
tree | 28a01420e1a82b85f248518c109d418176521903 /vl.c | |
parent | d4aceb2eb78a5f15e94791a43732c24b52c35dc5 (diff) |
qemu_set_log_filename: filename argument may be NULL
NULL is a valid log filename used to indicate we want to use stderr
but qemu_set_log_filename (which is called by bsd-user/main.c) was not
handling it correctly.
That also made redundant a couple of NULL checks in calling code which
have been removed.
Signed-off-by: Salvador Fandino <salvador@qindel.com>
Message-Id: <20200123193626.19956-1-salvador@qindel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -3903,10 +3903,7 @@ int main(int argc, char **argv, char **envp) /* Open the logfile at this point and set the log mask if necessary. */ - if (log_file) { - qemu_set_log_filename(log_file, &error_fatal); - } - + qemu_set_log_filename(log_file, &error_fatal); if (log_mask) { int mask; mask = qemu_str_to_log_mask(log_mask); |