Skip to content

Commit

Permalink
cloudinit.GenerateLocalData: drop ineffectual assignment
Browse files Browse the repository at this point in the history
commit 68fe5ef changed the signature of cloudInitIsoFunc() and dropped
the inFiles array from it. However, it kept building the files array in
cloudinit.GenerateLocalData ineffectually.

This change drops the needless `files` variable.

Thanks to Ezra Silvera for pointing this out.

Signed-off-by: Dan Kenigsberg <[email protected]>
  • Loading branch information
dankenigsberg committed Jan 29, 2021
1 parent c5ce27f commit e18a7a5
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/cloud-init/cloud-init.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,16 +535,11 @@ func GenerateLocalData(vmiName string, namespace string, data *CloudInitData) er
return err
}

files := make([]string, 0, 3)
files = append(files, metaFile)
files = append(files, userFile)

if len(networkData) > 0 {
err = ioutil.WriteFile(networkFile, networkData, 0644)
if err != nil {
return err
}
files = append(files, networkFile)
}

switch data.DataSource {
Expand Down

0 comments on commit e18a7a5

Please sign in to comment.