diff --git a/libcontainer/cgroups/systemd/apply_systemd.go b/libcontainer/cgroups/systemd/apply_systemd.go index 456c57d9..b010b4b3 100644 --- a/libcontainer/cgroups/systemd/apply_systemd.go +++ b/libcontainer/cgroups/systemd/apply_systemd.go @@ -353,7 +353,6 @@ func joinCgroups(c *configs.Cgroup, pid int) error { switch name { case "name=systemd": // let systemd handle this - break case "cpuset": path, err := getSubsystemPath(c, name) if err != nil && !cgroups.IsNotFound(err) { @@ -363,7 +362,6 @@ func joinCgroups(c *configs.Cgroup, pid int) error { if err := s.ApplyDir(path, c, pid); err != nil { return err } - break default: _, err := join(c, name, pid) if err != nil { diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index a21455da..612b17cd 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -803,7 +803,6 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { switch m.Device { case "bind": c.addCriuDumpMount(req, m) - break case "cgroup": binds, err := getCgroupMounts(m) if err != nil { @@ -812,7 +811,6 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { for _, b := range binds { c.addCriuDumpMount(req, b) } - break } } @@ -865,9 +863,8 @@ func (c *linuxContainer) restoreNetwork(req *criurpc.CriuReq, criuOpts *CriuOpts veth.IfOut = proto.String(iface.HostInterfaceName) veth.IfIn = proto.String(iface.Name) req.Opts.Veths = append(req.Opts.Veths, veth) - break case "loopback": - break + // Do nothing } } for _, i := range criuOpts.VethPairs { @@ -957,7 +954,6 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { switch m.Device { case "bind": c.addCriuRestoreMount(req, m) - break case "cgroup": binds, err := getCgroupMounts(m) if err != nil { @@ -966,7 +962,6 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { for _, b := range binds { c.addCriuRestoreMount(req, b) } - break } } @@ -1156,7 +1151,6 @@ func (c *linuxContainer) criuSwrk(process *Process, req *criurpc.CriuReq, opts * case t == criurpc.CriuReqType_FEATURE_CHECK: logrus.Debugf("Feature check says: %s", resp) criuFeatures = resp.GetFeatures() - break case t == criurpc.CriuReqType_NOTIFY: if err := c.criuNotifications(resp, process, opts, extFds, oob[:oobn]); err != nil { return err