Skip to content

Commit c5f0c63

Browse files
committed
Specify the size since we know that beforehand
Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent 0cf15f3 commit c5f0c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ func (s *service) createStubDrives(stubDriveCount int) ([]models.Drive, error) {
594594
return nil, errors.Wrap(err, "failed to retrieve stub drive paths")
595595
}
596596

597-
stubDrives := make([]models.Drive, 0)
597+
stubDrives := make([]models.Drive, 0, stubDriveCount)
598598
for i, path := range paths {
599599
stubDrives = append(stubDrives, models.Drive{
600600
DriveID: firecracker.String(fmt.Sprintf("stub%d", i)),

0 commit comments

Comments
 (0)