aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-07 21:32:12 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-07 21:32:12 +0000
commited4622dc7f7a4ee00c47dbdbe71e51e445b1132f (patch)
tree9166f863f63b55eaf67cd79da0c3dedda4b56204 /epan
parentbf6b5d74d6f5f821230b1635f0eec160d5e509f7 (diff)
ups? first add + 1, then multiply.
svn path=/trunk/; revision=50438
Diffstat (limited to 'epan')
-rw-r--r--epan/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 5e4d3de11c..83adf4e893 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5087,7 +5087,7 @@ proto_register_subtree_array(gint *const *indices, const int num_indices)
* dissector that registers ett values.)
*/
if (tree_is_expanded != NULL) {
- tree_is_expanded = (guint32 *)g_realloc(tree_is_expanded, (((num_tree_types + num_indices)/32) * sizeof(guint32)) + 1);
+ tree_is_expanded = (guint32 *)g_realloc(tree_is_expanded, (1+((num_tree_types + num_indices)/32)) * sizeof(guint32));
/* set new items to 0 */
/* XXX, slow!!! optimize when needed (align 'i' to 32, and set rest of guint32 to 0) */