Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350005
b: refs/heads/master
c: 8eb44dd
h: refs/heads/master
i:
  350003: 948f309
v: v3
  • Loading branch information
Thomas Jarosch authored and Arnaldo Carvalho de Melo committed Jan 30, 2013
1 parent 4e7d1b2 commit 4b63c89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 68c465ada54c730d653fc6fdc9dc0d5270b2de00
refs/heads/master: 8eb44dd76ac994b020e5cfe72635c90d9e0ad995
7 changes: 5 additions & 2 deletions trunk/tools/perf/util/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static int hist_entry__srcline_snprintf(struct hist_entry *self, char *bf,
size_t size,
unsigned int width __maybe_unused)
{
FILE *fp;
FILE *fp = NULL;
char cmd[PATH_MAX + 2], *path = self->srcline, *nl;
size_t line_len;

Expand All @@ -270,7 +270,6 @@ static int hist_entry__srcline_snprintf(struct hist_entry *self, char *bf,

if (getline(&path, &line_len, fp) < 0 || !line_len)
goto out_ip;
fclose(fp);
self->srcline = strdup(path);
if (self->srcline == NULL)
goto out_ip;
Expand All @@ -280,8 +279,12 @@ static int hist_entry__srcline_snprintf(struct hist_entry *self, char *bf,
*nl = '\0';
path = self->srcline;
out_path:
if (fp)
pclose(fp);
return repsep_snprintf(bf, size, "%s", path);
out_ip:
if (fp)
pclose(fp);
return repsep_snprintf(bf, size, "%-#*llx", BITS_PER_LONG / 4, self->ip);
}

Expand Down

0 comments on commit 4b63c89

Please sign in to comment.