diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-07-09 14:14:17 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-07-09 14:14:17 -0400 |
commit | f0e369a8213555b9ceec134bc5fe9f293417f835 (patch) | |
tree | deb68c7793884cd8b3153df47feefaf476ca97c7 /parse-events.c | |
parent | ca50cc080ccba4a1fcf336968326d49bbecaf0bd (diff) |
parse-events: Fix bprint %d to be 32 bit even on 64 bit boxes
The bprint processing of %d was the same as %ld, which would cause
it to read 8 bytes instead of 4 bytes on a 64 bit box. This would
cause the other parameters after it to be shifted by 4 bytes and
produce garbage results.
Reported-by: Darren Hart <dvhltc@us.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'parse-events.c')
-rw-r--r-- | parse-events.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-events.c b/parse-events.c index 53dc8ad..9d5a3fa 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -3314,6 +3314,8 @@ static struct print_arg *make_bprint_args(char *fmt, void *data, int size, struc | |||
3314 | ~3); | 3314 | ~3); |
3315 | switch (ls) { | 3315 | switch (ls) { |
3316 | case 0: | 3316 | case 0: |
3317 | ls = 4; | ||
3318 | break; | ||
3317 | case 1: | 3319 | case 1: |
3318 | ls = pevent->long_size; | 3320 | ls = pevent->long_size; |
3319 | break; | 3321 | break; |