Просмотр исходного кода

functional-tester/rpcpb: simplify "return err"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 8 лет назад
Родитель
Сommit
ae56cf014d
1 измененных файлов с 1 добавлено и 4 удалено
  1. 1 4
      tools/functional-tester/rpcpb/member.go

+ 1 - 4
tools/functional-tester/rpcpb/member.go

@@ -86,10 +86,7 @@ func (m *Member) Defrag() error {
 	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
 	_, err = cli.Defragment(ctx, m.EtcdClientEndpoint)
 	cancel()
-	if err != nil {
-		return err
-	}
-	return nil
+	return err
 }
 
 // RevHash fetches current revision and hash on this member.