Skip to content

Commit

Permalink
database: allocate transaction results capacity
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@redhat.com>
  • Loading branch information
jcaamano committed Jun 6, 2022
1 parent 184d678 commit b16f25a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewTransaction(model model.DatabaseModel, dbName string, database Database,
}

func (t *Transaction) Transact(operations []ovsdb.Operation) ([]ovsdb.OperationResult, ovsdb.TableUpdates2) {
results := []ovsdb.OperationResult{}
results := make([]ovsdb.OperationResult, 0, len(operations)+1)
updates := make(ovsdb.TableUpdates2)

for _, op := range operations {
Expand Down

0 comments on commit b16f25a

Please sign in to comment.