Re: [PATCH 12/13] perf tests: Add test for caching dso file descriptors

From: David Ahern
Date: Tue Jun 03 2014 - 09:57:06 EST


On 6/2/14, 3:18 PM, Jiri Olsa wrote:
+static int dsos__create(int cnt, int size)
+{
+ int i;
+
+ dsos = malloc(sizeof(dsos) * cnt);
+ TEST_ASSERT_VAL("failed to alloc dsos array", dsos);
+
+ for (i = 0; i < cnt; i++) {
+ char *file;
+
+ file = test_file(size);
+ TEST_ASSERT_VAL("failed to get dso file", file);
+
+ dsos[i] = dso__new((const char *)file);
+ TEST_ASSERT_VAL("failed to get dso", dsos[i]);

typecast is not needed.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/