summaryrefslogtreecommitdiff
path: root/src/bootchart/svg.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-05 22:24:10 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-10 18:59:42 -0400
commit1c6330456c5ae76085c63d2a7cf3d722596e545a (patch)
tree3b6a50e4fd7e7342679b3deb0f254b545567e7f5 /src/bootchart/svg.c
parent0affed79d2e30013f07cb94e6f07e3fcb81c02fa (diff)
Use initalization instead of explicit zeroing in more places
Diffstat (limited to 'src/bootchart/svg.c')
-rw-r--r--src/bootchart/svg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index a4086c5227..3472bc0ae8 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -978,12 +978,11 @@ static void svg_ps_bars(void) {
static void svg_top_ten_cpu(void) {
struct ps_struct *top[10];
- struct ps_struct emptyps;
+ struct ps_struct emptyps = {};
struct ps_struct *ps;
int n, m;
- memset(&emptyps, 0, sizeof(struct ps_struct));
- for (n=0; n < 10; n++)
+ for (n = 0; n < (int) ELEMENTSOF(top); n++)
top[n] = &emptyps;
/* walk all ps's and setup ptrs */
@@ -1011,12 +1010,11 @@ static void svg_top_ten_cpu(void) {
static void svg_top_ten_pss(void) {
struct ps_struct *top[10];
- struct ps_struct emptyps;
+ struct ps_struct emptyps = {};
struct ps_struct *ps;
int n, m;
- memset(&emptyps, 0, sizeof(struct ps_struct));
- for (n=0; n < 10; n++)
+ for (n = 0; n < (int) ELEMENTSOF(top); n++)
top[n] = &emptyps;
/* walk all ps's and setup ptrs */