summaryrefslogtreecommitdiff
path: root/btt/unplug_hist.c
diff options
context:
space:
mode:
Diffstat (limited to 'btt/unplug_hist.c')
-rw-r--r--btt/unplug_hist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/btt/unplug_hist.c b/btt/unplug_hist.c
index 89995de..be16b69 100644
--- a/btt/unplug_hist.c
+++ b/btt/unplug_hist.c
@@ -34,11 +34,11 @@ void *unplug_hist_alloc(struct d_info *dip)
{
struct hist_bkt *hbp;
- if (unplug_hist_name == NULL) return NULL;
+ if (unplug_hist_name == NULL)
+ return NULL;
- hbp = malloc(sizeof(*hbp));
+ hbp = calloc(1, sizeof(*hbp));
hbp->dip = dip;
- memset(hbp->hist, 0, NBKTS * sizeof(int));
return hbp;
}