mirror of
https://github.com/minio/minio.git
synced 2025-05-21 09:33:50 -04:00
Fixed tautological conditions (#7959)
We already check for err being equal to nil above, no need to check again.
This commit is contained in:
parent
c5faba55c1
commit
38bc3a45db
@ -1830,9 +1830,7 @@ func TestPosixVerifyFile(t *testing.T) {
|
|||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if err != nil {
|
t.Fatal(err)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
w.Close()
|
w.Close()
|
||||||
if err := posixStorage.VerifyFile(volName, fileName, false, algo, nil, shardSize); err != nil {
|
if err := posixStorage.VerifyFile(volName, fileName, false, algo, nil, shardSize); err != nil {
|
||||||
|
@ -163,13 +163,14 @@ func NewAMQPTarget(id string, args AMQPArgs) (*AMQPTarget, error) {
|
|||||||
// Retry 5 times with time interval of 2 seconds.
|
// Retry 5 times with time interval of 2 seconds.
|
||||||
for i := 1; i <= 5; i++ {
|
for i := 1; i <= 5; i++ {
|
||||||
conn, err = amqp.Dial(args.URL.String())
|
conn, err = amqp.Dial(args.URL.String())
|
||||||
if err == nil {
|
if err != nil {
|
||||||
break
|
if i == 5 {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if err != nil && i == 5 {
|
break
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
time.Sleep(2 * time.Second)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &AMQPTarget{
|
return &AMQPTarget{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user