diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2009-12-22 23:30:48 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-22 23:30:48 -0500 |
commit | 86ef53184de667e68163dfb5a88f77c9916557ad (patch) | |
tree | ed7a9e0292293d4b82348798f9dccb14f09cc0ba | |
parent | 507200e51aed13cb11fbe54eaaee6f4bbe4aaade (diff) |
parse-events: Use parethesis to malloc sizeof * count + 1
[paper bag bug!]
Use parenthesis around + when adding 1 to a count multiplied by size.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | parse-events.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-events.c b/parse-events.c index 4ba7df9..9bbb401 100644 --- a/parse-events.c +++ b/parse-events.c | |||
@@ -270,7 +270,7 @@ static int func_map_init(struct pevent *pevent) | |||
270 | struct func_map *func_map; | 270 | struct func_map *func_map; |
271 | int i; | 271 | int i; |
272 | 272 | ||
273 | func_map = malloc_or_die(sizeof(*func_map) * pevent->func_count + 1); | 273 | func_map = malloc_or_die(sizeof(*func_map) * (pevent->func_count + 1)); |
274 | funclist = pevent->funclist; | 274 | funclist = pevent->funclist; |
275 | 275 | ||
276 | i = 0; | 276 | i = 0; |
@@ -420,7 +420,7 @@ static void printk_map_init(struct pevent *pevent) | |||
420 | struct printk_map *printk_map; | 420 | struct printk_map *printk_map; |
421 | int i; | 421 | int i; |
422 | 422 | ||
423 | printk_map = malloc_or_die(sizeof(*printk_map) * pevent->printk_count + 1); | 423 | printk_map = malloc_or_die(sizeof(*printk_map) * (pevent->printk_count + 1)); |
424 | 424 | ||
425 | printklist = pevent->printklist; | 425 | printklist = pevent->printklist; |
426 | 426 | ||