Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175420
b: refs/heads/master
c: 17f88fc
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Dec 9, 2009
1 parent 143d707 commit e155f52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: d1bde3f755e8652faad59e264c466c4baab68fa8
refs/heads/master: 17f88fcd667a914b6f4dca146c9a09492fcd57b8
11 changes: 10 additions & 1 deletion trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,16 @@ static void get_new_event_name(char *buf, size_t len, const char *base,
struct strlist *namelist)
{
int i, ret;
for (i = 0; i < MAX_EVENT_INDEX; i++) {

/* Try no suffix */
ret = e_snprintf(buf, len, "%s", base);
if (ret < 0)
die("snprintf() failed: %s", strerror(-ret));
if (!strlist__has_entry(namelist, buf))
return;

/* Try to add suffix */
for (i = 1; i < MAX_EVENT_INDEX; i++) {
ret = e_snprintf(buf, len, "%s_%d", base, i);
if (ret < 0)
die("snprintf() failed: %s", strerror(-ret));
Expand Down

0 comments on commit e155f52

Please sign in to comment.