mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 06:21:52 -06:00
qga: fix compiler warnings (clang 5)
static code analyzer complain: qga/commands-posix.c:2127:9: warning: Null pointer passed as an argument to a 'nonnull' parameter closedir(dp); ^~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
21a9ad2f15
commit
9879f5ac62
1 changed files with 5 additions and 3 deletions
|
@ -2125,9 +2125,11 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
|
||||||
* we think this VM does not support online/offline memory block,
|
* we think this VM does not support online/offline memory block,
|
||||||
* any other solution?
|
* any other solution?
|
||||||
*/
|
*/
|
||||||
if (!dp && errno == ENOENT) {
|
if (!dp) {
|
||||||
result->response =
|
if (errno == ENOENT) {
|
||||||
GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
|
result->response =
|
||||||
|
GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
goto out1;
|
goto out1;
|
||||||
}
|
}
|
||||||
closedir(dp);
|
closedir(dp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue