diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-05 22:24:10 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-10 18:59:42 -0400 |
commit | 1c6330456c5ae76085c63d2a7cf3d722596e545a (patch) | |
tree | 3b6a50e4fd7e7342679b3deb0f254b545567e7f5 /src/bootchart/bootchart.c | |
parent | 0affed79d2e30013f07cb94e6f07e3fcb81c02fa (diff) |
Use initalization instead of explicit zeroing in more places
Diffstat (limited to 'src/bootchart/bootchart.c')
-rw-r--r-- | src/bootchart/bootchart.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index 208c4528e7..288148f483 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -239,7 +239,9 @@ static int parse_args(int argc, char *argv[]) { int main(int argc, char *argv[]) { _cleanup_free_ char *build = NULL; - struct sigaction sig; + struct sigaction sig = { + .sa_handler = signal_handler, + }; struct ps_struct *ps; char output_file[PATH_MAX]; char datestr[200]; @@ -279,8 +281,6 @@ int main(int argc, char *argv[]) { } /* handle TERM/INT nicely */ - memset(&sig, 0, sizeof(struct sigaction)); - sig.sa_handler = signal_handler; sigaction(SIGHUP, &sig, NULL); interval = (1.0 / arg_hz) * 1000000000.0; |