Merge pull request #7809 from LK4D4/use_increment

Use increment operator
This commit is contained in:
Michael Crosby 2014-09-01 11:16:25 -07:00
commit ec87846908
3 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -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

View file

@ -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 {