OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d09eb7
)
perf tools: Simplify event_read_id exit path
author
Borislav Petkov
<bp@amd64.org>
Wed, 21 Mar 2012 14:15:47 +0000
(15:15 +0100)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Thu, 22 Mar 2012 18:10:42 +0000
(15:10 -0300)
We're freeing the token in any case so simplify the exit path by
unifying it.
No functional change.
Signed-off-by: Borislav Petkov <bp@amd64.org>
Link:
http://lkml.kernel.org/r/1332339347-21342-1-git-send-email-bp@amd64.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/trace-event-parse.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/trace-event-parse.c
b/tools/perf/util/trace-event-parse.c
index
a4088ce
..
dfd1bd8
100644
(file)
--- a/
tools/perf/util/trace-event-parse.c
+++ b/
tools/perf/util/trace-event-parse.c
@@
-722,7
+722,7
@@
static char *event_read_name(void)
static int event_read_id(void)
{
char *token;
- int id;
+ int id
= -1
;
if (read_expected_item(EVENT_ITEM, "ID") < 0)
return -1;
@@
-731,15
+731,13
@@
static int event_read_id(void)
return -1;
if (read_expect_type(EVENT_ITEM, &token) < 0)
- goto f
ail
;
+ goto f
ree
;
id = strtoul(token, NULL, 0);
- free_token(token);
- return id;
- f
ail
:
+ f
ree
:
free_token(token);
- return
-1
;
+ return
id
;
}
static int field_is_string(struct format_field *field)