Merge branch 'akpm' (patches from Andrew)
[deliverable/linux.git] / tools / perf / builtin-buildid-cache.c
index d75bded21fe0ce73ef9aea745ff565c9ba61a204..30e2b2cb2421219de6cc168483f5e9144af8036c 100644 (file)
@@ -209,7 +209,7 @@ static int build_id_cache__purge_path(const char *pathname)
        if (err)
                goto out;
 
-       strlist__for_each(pos, list) {
+       strlist__for_each_entry(pos, list) {
                err = build_id_cache__remove_s(pos->s);
                pr_debug("Removing %s %s: %s\n", pos->s, pathname,
                         err ? "FAIL" : "Ok");
@@ -343,7 +343,7 @@ int cmd_buildid_cache(int argc, const char **argv,
        if (add_name_list_str) {
                list = strlist__new(add_name_list_str, NULL);
                if (list) {
-                       strlist__for_each(pos, list)
+                       strlist__for_each_entry(pos, list)
                                if (build_id_cache__add_file(pos->s)) {
                                        if (errno == EEXIST) {
                                                pr_debug("%s already in the cache\n",
@@ -351,7 +351,7 @@ int cmd_buildid_cache(int argc, const char **argv,
                                                continue;
                                        }
                                        pr_warning("Couldn't add %s: %s\n",
-                                                  pos->s, strerror_r(errno, sbuf, sizeof(sbuf)));
+                                                  pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
                                }
 
                        strlist__delete(list);
@@ -361,7 +361,7 @@ int cmd_buildid_cache(int argc, const char **argv,
        if (remove_name_list_str) {
                list = strlist__new(remove_name_list_str, NULL);
                if (list) {
-                       strlist__for_each(pos, list)
+                       strlist__for_each_entry(pos, list)
                                if (build_id_cache__remove_file(pos->s)) {
                                        if (errno == ENOENT) {
                                                pr_debug("%s wasn't in the cache\n",
@@ -369,7 +369,7 @@ int cmd_buildid_cache(int argc, const char **argv,
                                                continue;
                                        }
                                        pr_warning("Couldn't remove %s: %s\n",
-                                                  pos->s, strerror_r(errno, sbuf, sizeof(sbuf)));
+                                                  pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
                                }
 
                        strlist__delete(list);
@@ -379,7 +379,7 @@ int cmd_buildid_cache(int argc, const char **argv,
        if (purge_name_list_str) {
                list = strlist__new(purge_name_list_str, NULL);
                if (list) {
-                       strlist__for_each(pos, list)
+                       strlist__for_each_entry(pos, list)
                                if (build_id_cache__purge_path(pos->s)) {
                                        if (errno == ENOENT) {
                                                pr_debug("%s wasn't in the cache\n",
@@ -387,7 +387,7 @@ int cmd_buildid_cache(int argc, const char **argv,
                                                continue;
                                        }
                                        pr_warning("Couldn't remove %s: %s\n",
-                                                  pos->s, strerror_r(errno, sbuf, sizeof(sbuf)));
+                                                  pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
                                }
 
                        strlist__delete(list);
@@ -400,7 +400,7 @@ int cmd_buildid_cache(int argc, const char **argv,
        if (update_name_list_str) {
                list = strlist__new(update_name_list_str, NULL);
                if (list) {
-                       strlist__for_each(pos, list)
+                       strlist__for_each_entry(pos, list)
                                if (build_id_cache__update_file(pos->s)) {
                                        if (errno == ENOENT) {
                                                pr_debug("%s wasn't in the cache\n",
@@ -408,7 +408,7 @@ int cmd_buildid_cache(int argc, const char **argv,
                                                continue;
                                        }
                                        pr_warning("Couldn't update %s: %s\n",
-                                                  pos->s, strerror_r(errno, sbuf, sizeof(sbuf)));
+                                                  pos->s, str_error_r(errno, sbuf, sizeof(sbuf)));
                                }
 
                        strlist__delete(list);
@@ -419,8 +419,7 @@ int cmd_buildid_cache(int argc, const char **argv,
                pr_warning("Couldn't add %s\n", kcore_filename);
 
 out:
-       if (session)
-               perf_session__delete(session);
+       perf_session__delete(session);
 
        return ret;
 }
This page took 0.026217 seconds and 5 git commands to generate.