Skip to content

Commit

Permalink
Fix code linting issue where a slice was created non-empty and append…
Browse files Browse the repository at this point in the history
…ed-to (#19490)
  • Loading branch information
mna authored and georgekarrv committed Jun 20, 2024
1 parent 63e4c5f commit 14c7fc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changes/19290-fix-make-slice-with-capacity
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fixed a code linter issue where a slice was created non-empty and appended-to, instead of empty with the required capacity.
2 changes: 1 addition & 1 deletion server/datastore/mysql/microsoft_mdm.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func updateMDMWindowsHostProfileStatusFromResponseDB(
WHERE host_uuid = ? AND command_uuid IN (?)`

// grab command UUIDs to find matching entries using `getMatchingHostProfilesStmt`
commandUUIDs := make([]string, len(payloads))
commandUUIDs := make([]string, 0, len(payloads))
// also grab the payloads keyed by the command uuid, so we can easily
// grab the corresponding `Detail` and `Status` from the matching
// command later on.
Expand Down

0 comments on commit 14c7fc5

Please sign in to comment.