Replace if/else with simple if (#9913)
This commit is contained in:
parent
8aaa1bd7a6
commit
0719f906d4
|
@ -73,12 +73,11 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
|
||||||
var deviceArgs []string
|
var deviceArgs []string
|
||||||
var driveArgs []string
|
var driveArgs []string
|
||||||
var commHostPort int
|
var commHostPort int
|
||||||
var vnc string
|
|
||||||
|
|
||||||
if !config.VNCUsePassword {
|
vncPort = vncPort - config.VNCPortMin
|
||||||
vnc = fmt.Sprintf("%s:%d", vncIP, vncPort-config.VNCPortMin)
|
vnc := fmt.Sprintf("%s:%d", vncIP, vncPort)
|
||||||
} else {
|
if config.VNCUsePassword {
|
||||||
vnc = fmt.Sprintf("%s:%d,password", vncIP, vncPort-config.VNCPortMin)
|
vnc = fmt.Sprintf("%s:%d,password", vncIP, vncPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.QMPEnable {
|
if config.QMPEnable {
|
||||||
|
|
Loading…
Reference in New Issue