mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 23:47:07 +00:00
Merge pull request #2524 from Bevisy/main-2264
runtime: Optimize the way slice created
This commit is contained in:
commit
a89cc0bb5c
@ -742,11 +742,7 @@ func (clh *cloudHypervisor) check() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (clh *cloudHypervisor) getPids() []int {
|
func (clh *cloudHypervisor) getPids() []int {
|
||||||
|
return []int{clh.state.PID}
|
||||||
var pids []int
|
|
||||||
pids = append(pids, clh.state.PID)
|
|
||||||
|
|
||||||
return pids
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (clh *cloudHypervisor) getVirtioFsPid() *int {
|
func (clh *cloudHypervisor) getVirtioFsPid() *int {
|
||||||
|
@ -2280,8 +2280,7 @@ func (q *qemu) getPids() []int {
|
|||||||
return []int{0}
|
return []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
var pids []int
|
pids := []int{pid}
|
||||||
pids = append(pids, pid)
|
|
||||||
if q.state.VirtiofsdPid != 0 {
|
if q.state.VirtiofsdPid != 0 {
|
||||||
pids = append(pids, q.state.VirtiofsdPid)
|
pids = append(pids, q.state.VirtiofsdPid)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user