From 60d7ff315b54d4ed171a1f0ee74440463400e9e6 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Tue, 13 Dec 2011 00:16:51 +0900 Subject: [PATCH] --- yaml --- r: 277339 b: refs/heads/master c: 2b600f9578852d12af59420011e3dadfaa58b043 h: refs/heads/master i: 277337: afee8ad92d22eb82c511c702483e0472f0e0557f 277335: a5cc9310636b17e3e6892c7df4a4e26220d8d9f9 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 07a67911161c..84989648a587 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 301b195db179241da8be25f345f3c4e64960f1d5 +refs/heads/master: 2b600f9578852d12af59420011e3dadfaa58b043 diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index 632b50c7bc26..e54b13d4c357 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -1757,7 +1757,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg, struct stat st; /*sshfs might return bad dent->d_type, so we have to stat*/ - sprintf(path, "%s/%s", dir_name, dent->d_name); + snprintf(path, sizeof(path), "%s/%s", dir_name, dent->d_name); if (stat(path, &st)) continue; @@ -1766,8 +1766,6 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg, !strcmp(dent->d_name, "..")) continue; - snprintf(path, sizeof(path), "%s/%s", - dir_name, dent->d_name); ret = map_groups__set_modules_path_dir(mg, path); if (ret < 0) goto out; @@ -1788,9 +1786,6 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg, if (map == NULL) continue; - snprintf(path, sizeof(path), "%s/%s", - dir_name, dent->d_name); - long_name = strdup(path); if (long_name == NULL) { ret = -1;