summaryrefslogtreecommitdiff
path: root/src/bootchart/bootchart.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2013-01-10 11:35:00 -0800
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-01-10 15:21:48 -0500
commita2e9b3380804c9eff565836b0e32b88389d4391c (patch)
treecf9de3c53121b03354c3d7cd9e006b14d654ad96 /src/bootchart/bootchart.c
parent53f5329f7aa321d72847cd7f8f28da9a7db80331 (diff)
bootchart: Convert malloc/memset to calloc
Diffstat (limited to 'src/bootchart/bootchart.c')
-rw-r--r--src/bootchart/bootchart.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 7bcfd98249..37d8fbe6e9 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -232,12 +232,11 @@ int main(int argc, char *argv[])
}
/* start with empty ps LL */
- ps_first = malloc(sizeof(struct ps_struct));
+ ps_first = calloc(1, sizeof(struct ps_struct));
if (!ps_first) {
- perror("malloc(ps_struct)");
+ perror("calloc(ps_struct)");
exit(EXIT_FAILURE);
}
- memset(ps_first, 0, sizeof(struct ps_struct));
/* handle TERM/INT nicely */
memset(&sig, 0, sizeof(struct sigaction));