diff options
Diffstat (limited to '')
-rw-r--r-- | tools/perf/util/machine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 6188d2876a71..ddf917b787fa 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -785,10 +785,10 @@ static int machine__create_modules(struct machine *machine) const char *modules; char path[PATH_MAX]; - if (machine__is_default_guest(machine)) + if (machine__is_default_guest(machine)) { modules = symbol_conf.default_guest_modules; - else { - sprintf(path, "%s/proc/modules", machine->root_dir); + } else { + snprintf(path, PATH_MAX, "%s/proc/modules", machine->root_dir); modules = path; } |