Skip to content

Commit

Permalink
Fix warnings about uninitialized memory (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkuhn committed May 8, 2019
1 parent 435710f commit c88ff43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/object/distributed-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test_object_read_write (void)
max_operation_size = j_configuration_get_max_operation_size(j_configuration());

batch = j_batch_new_for_template(J_SEMANTICS_TEMPLATE_DEFAULT);
buffer = g_malloc(max_operation_size + 1);
buffer = g_malloc0(max_operation_size + 1);

distribution = j_distribution_new(J_DISTRIBUTION_ROUND_ROBIN);
j_distribution_set_block_size(distribution, max_operation_size + 1);
Expand Down Expand Up @@ -152,7 +152,7 @@ test_object_status (void)
guint64 size = 0;

batch = j_batch_new_for_template(J_SEMANTICS_TEMPLATE_DEFAULT);
buffer = g_malloc(42);
buffer = g_malloc0(42);

distribution = j_distribution_new(J_DISTRIBUTION_ROUND_ROBIN);
object = j_distributed_object_new("test", "test-object-status", distribution);
Expand Down
4 changes: 2 additions & 2 deletions test/object/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ test_object_read_write (void)
max_operation_size = j_configuration_get_max_operation_size(j_configuration());

batch = j_batch_new_for_template(J_SEMANTICS_TEMPLATE_DEFAULT);
buffer = g_malloc(max_operation_size + 1);
buffer = g_malloc0(max_operation_size + 1);

object = j_object_new("test", "test-object-rw");
g_assert(object != NULL);
Expand Down Expand Up @@ -144,7 +144,7 @@ test_object_status (void)
guint64 size = 0;

batch = j_batch_new_for_template(J_SEMANTICS_TEMPLATE_DEFAULT);
buffer = g_malloc(42);
buffer = g_malloc0(42);

object = j_object_new("test", "test-object-status");
g_assert(object != NULL);
Expand Down

0 comments on commit c88ff43

Please sign in to comment.