Browse Source

etcdserver: remove unnecessary if-statement

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
9934034bb1
1 changed files with 1 additions and 4 deletions
  1. 1 4
      etcdserver/apply_auth.go

+ 1 - 4
etcdserver/apply_auth.go

@@ -156,10 +156,7 @@ func checkTxnAuth(as auth.AuthStore, ai *auth.AuthInfo, rt *pb.TxnRequest) error
 	if err := checkTxnReqsPermission(as, ai, rt.Success); err != nil {
 		return err
 	}
-	if err := checkTxnReqsPermission(as, ai, rt.Failure); err != nil {
-		return err
-	}
-	return nil
+	return checkTxnReqsPermission(as, ai, rt.Failure)
 }
 
 func (aa *authApplierV3) Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) {