Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349977
b: refs/heads/master
c: be651ed
h: refs/heads/master
i:
  349975: 0e0cd20
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 24, 2013
1 parent d1d9f0f commit 8cb26dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23b6339b914ec009ba206584a410039b589243aa
refs/heads/master: be651ed98dd362fa4151f49f917c74e9e8da88ac
9 changes: 2 additions & 7 deletions trunk/tools/perf/tests/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ static struct test_format {
{ "krava23", "config2:28-29,38\n", },
};

#define TEST_FORMATS_CNT (sizeof(test_formats) / sizeof(struct test_format))

/* Simulated users input. */
static struct parse_events_term test_terms[] = {
{
Expand Down Expand Up @@ -78,7 +76,6 @@ static struct parse_events_term test_terms[] = {
.type_term = PARSE_EVENTS__TERM_TYPE_USER,
},
};
#define TERMS_CNT (sizeof(test_terms) / sizeof(struct parse_events_term))

/*
* Prepare format directory data, exported by kernel
Expand All @@ -93,7 +90,7 @@ static char *test_format_dir_get(void)
if (!mkdtemp(dir))
return NULL;

for (i = 0; i < TEST_FORMATS_CNT; i++) {
for (i = 0; i < ARRAY_SIZE(test_formats); i++) {
static char name[PATH_MAX];
struct test_format *format = &test_formats[i];
FILE *file;
Expand Down Expand Up @@ -130,14 +127,12 @@ static struct list_head *test_terms_list(void)
static LIST_HEAD(terms);
unsigned int i;

for (i = 0; i < TERMS_CNT; i++)
for (i = 0; i < ARRAY_SIZE(test_terms); i++)
list_add_tail(&test_terms[i].list, &terms);

return &terms;
}

#undef TERMS_CNT

int test__pmu(void)
{
char *format = test_format_dir_get();
Expand Down

0 comments on commit 8cb26dc

Please sign in to comment.