зеркало из https://github.com/microsoft/docker.git
Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Родитель
280b64bc7b
Коммит
16e850fe3e
|
@ -1218,7 +1218,7 @@ func ServeFd(addr string, handle http.Handler) error {
|
|||
}()
|
||||
}
|
||||
|
||||
for i := 0; i < len(ls); i += 1 {
|
||||
for i := 0; i < len(ls); i++ {
|
||||
err := <-chErrors
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -1366,7 +1366,7 @@ func ServeApi(job *engine.Job) engine.Status {
|
|||
}()
|
||||
}
|
||||
|
||||
for i := 0; i < len(protoAddrs); i += 1 {
|
||||
for i := 0; i < len(protoAddrs); i++ {
|
||||
err := <-chErrors
|
||||
if err != nil {
|
||||
return job.Error(err)
|
||||
|
|
|
@ -832,7 +832,7 @@ func (devices *DeviceSet) waitRemove(devname string) error {
|
|||
log.Debugf("[deviceset %s] waitRemove(%s)", devices.devicePrefix, devname)
|
||||
defer log.Debugf("[deviceset %s] waitRemove(%s) END", devices.devicePrefix, devname)
|
||||
i := 0
|
||||
for ; i < 1000; i += 1 {
|
||||
for ; i < 1000; i++ {
|
||||
devinfo, err := getInfo(devname)
|
||||
if err != nil {
|
||||
// If there is an error we assume the device doesn't exist.
|
||||
|
@ -861,7 +861,7 @@ func (devices *DeviceSet) waitRemove(devname string) error {
|
|||
// or b) the 10 second timeout expires.
|
||||
func (devices *DeviceSet) waitClose(info *DevInfo) error {
|
||||
i := 0
|
||||
for ; i < 1000; i += 1 {
|
||||
for ; i < 1000; i++ {
|
||||
devinfo, err := getInfo(info.Name())
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -46,7 +46,7 @@ func (r *resumableRequestReader) Read(p []byte) (n int, err error) {
|
|||
}
|
||||
if err != nil && r.failures+1 != r.maxFailures {
|
||||
r.cleanUpResponse()
|
||||
r.failures += 1
|
||||
r.failures++
|
||||
time.Sleep(5 * time.Duration(r.failures) * time.Second)
|
||||
return 0, nil
|
||||
} else if err != nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче