mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #7809 from LK4D4/use_increment
Use increment operator
This commit is contained in:
commit
ec87846908
3 changed files with 5 additions and 5 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue