Skip to content

Commit

Permalink
Use calloc to allocate stinger instead of malloc+memset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehein6 committed Oct 28, 2016
1 parent 0ad470a commit eb9849a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/stinger_core/src/stinger.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,7 @@ struct stinger *stinger_new_full (struct stinger_config_t * config)
}
}

struct stinger *G = xmalloc (sizeof(struct stinger) + sizes.size);

xzero(G, sizeof(struct stinger) + sizes.size);
struct stinger *G = xcalloc (sizeof(struct stinger) + sizes.size, 1);

G->max_nv = nv;
G->max_neblocks = nebs;
Expand Down

0 comments on commit eb9849a

Please sign in to comment.