Pass nil instead of []string{} to ctx.Glob* functions
[]string{} is unnecessary, just use nil.
Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: Ia9aeb2ffc483429787da0e473a7f1bc87eb4cad1
diff --git a/android/paths.go b/android/paths.go
index 3d4d3f3..fa2e10e 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -269,7 +269,7 @@
// Use Glob so that if the default doesn't exist, a dependency is added so that when it
// is created, we're run again.
path := filepath.Join(ctx.Config().srcDir, ctx.ModuleDir(), def)
- return ctx.Glob(path, []string{})
+ return ctx.Glob(path, nil)
}
// Strings returns the Paths in string form
@@ -635,7 +635,7 @@
if pathtools.IsGlob(dir) {
reportPathErrorf(ctx, "Path may not contain a glob: %s", dir)
}
- paths, err := ctx.GlobWithDeps(dir, []string{})
+ paths, err := ctx.GlobWithDeps(dir, nil)
if err != nil {
reportPathErrorf(ctx, "glob: %s", err.Error())
return OptionalPath{}