mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
nodedev: handle failure to generate mdevctl cmd
Coverity complained that the 'default' case of the switch in nodeDeviceGetMdevctlCommand() was falling through without initializing 'cmd'. Return NULL in this case even though it should never happen. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d0913302a8
commit
2d847765d2
@ -743,7 +743,7 @@ nodeDeviceGetMdevctlCommand(virNodeDeviceDef *def,
|
||||
case MDEVCTL_CMD_LAST:
|
||||
default:
|
||||
/* SHOULD NEVER HAPPEN */
|
||||
break;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (cmd_type) {
|
||||
|
Loading…
Reference in New Issue
Block a user