Skip to content

Commit

Permalink
Merge pull request edgexfoundry#4938 from cuishuang/main
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
cloudxxx8 authored Oct 5, 2024
2 parents 5e8cc2d + 51dc6ba commit 2495dbd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *Client) AddScheduleActionRecord(ctx context.Context, scheduleActionReco

// AddScheduleActionRecords adds multiple schedule action records to the database
func (c *Client) AddScheduleActionRecords(ctx context.Context, scheduleActionRecords []model.ScheduleActionRecord) ([]model.ScheduleActionRecord, errors.EdgeX) {
records := make([]model.ScheduleActionRecord, len(scheduleActionRecords))
records := make([]model.ScheduleActionRecord, 0, len(scheduleActionRecords))
for _, record := range scheduleActionRecords {
r, err := c.AddScheduleActionRecord(ctx, record)
if err != nil {
Expand Down

0 comments on commit 2495dbd

Please sign in to comment.