lkml.org 
[lkml]   [2014]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/13] perf tests: Add test for caching dso file descriptors
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


\
 
 \ /
  Last update: 2014-06-03 16:41    [W:0.354 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site