From ed35971a99935127a96e6c0d1b3b48df4201b4c3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 Oct 2010 23:34:56 +0000 Subject: [PATCH] small refactoring --- door_daemon/sig_handler.c | 12 ++++++------ powersensordaemon/sig_handler.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/door_daemon/sig_handler.c b/door_daemon/sig_handler.c index 5cdaaa1..55fe556 100644 --- a/door_daemon/sig_handler.c +++ b/door_daemon/sig_handler.c @@ -82,13 +82,13 @@ int signal_init() } } - struct sigaction act, act_ign; + struct sigaction act, ign; act.sa_handler = sig_handler; sigfillset(&act.sa_mask); act.sa_flags = 0; - act_ign.sa_handler = SIG_IGN; - sigfillset(&act_ign.sa_mask); - act_ign.sa_flags = 0; + ign.sa_handler = SIG_IGN; + sigfillset(&ign.sa_mask); + ign.sa_flags = 0; if((sigaction(SIGINT, &act, NULL) < 0) || (sigaction(SIGQUIT, &act, NULL) < 0) || @@ -96,8 +96,8 @@ int signal_init() (sigaction(SIGHUP, &act, NULL) < 0) || (sigaction(SIGUSR1, &act, NULL) < 0) || (sigaction(SIGUSR2, &act, NULL) < 0) || - (sigaction(SIGCHLD, &act_ign, NULL) < 0) || - (sigaction(SIGPIPE, &act_ign, NULL) < 0)) { + (sigaction(SIGCHLD, &ign, NULL) < 0) || + (sigaction(SIGPIPE, &ign, NULL) < 0)) { log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno)); close(sig_pipe_fds[0]); diff --git a/powersensordaemon/sig_handler.c b/powersensordaemon/sig_handler.c index 5cdaaa1..55fe556 100644 --- a/powersensordaemon/sig_handler.c +++ b/powersensordaemon/sig_handler.c @@ -82,13 +82,13 @@ int signal_init() } } - struct sigaction act, act_ign; + struct sigaction act, ign; act.sa_handler = sig_handler; sigfillset(&act.sa_mask); act.sa_flags = 0; - act_ign.sa_handler = SIG_IGN; - sigfillset(&act_ign.sa_mask); - act_ign.sa_flags = 0; + ign.sa_handler = SIG_IGN; + sigfillset(&ign.sa_mask); + ign.sa_flags = 0; if((sigaction(SIGINT, &act, NULL) < 0) || (sigaction(SIGQUIT, &act, NULL) < 0) || @@ -96,8 +96,8 @@ int signal_init() (sigaction(SIGHUP, &act, NULL) < 0) || (sigaction(SIGUSR1, &act, NULL) < 0) || (sigaction(SIGUSR2, &act, NULL) < 0) || - (sigaction(SIGCHLD, &act_ign, NULL) < 0) || - (sigaction(SIGPIPE, &act_ign, NULL) < 0)) { + (sigaction(SIGCHLD, &ign, NULL) < 0) || + (sigaction(SIGPIPE, &ign, NULL) < 0)) { log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno)); close(sig_pipe_fds[0]); -- 1.7.10.4