aboutsummaryrefslogtreecommitdiffstats
path: root/src/dmon.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-19 23:31:56 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-11-02 18:32:17 +0100
commit7cc6305588acea9c7960abaacf823d62f798f5ba (patch)
tree415648b8c723eba9a34fc3fc76056f798e170477 /src/dmon.c
parent44bc9605d6d3af9162dc917c43b7a466a24a230b (diff)
downloadcalcurse-7cc6305588acea9c7960abaacf823d62f798f5ba.tar.gz
calcurse-7cc6305588acea9c7960abaacf823d62f798f5ba.zip
Do not cast unused return values to void
A small style fix that removes all remaining "(void)" casts. Using these isn't encouraged in GNU coding guidelines and doesn't serve a certain purpose, except for satisfying a few static code analysis tools. We already nuked some of these in previous patches, but this semantic patch should fix what's left: @@ identifier func; @@ - (void)func ( + func ( ...); Long lines were re-formatted manually. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/dmon.c')
-rw-r--r--src/dmon.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dmon.c b/src/dmon.c
index 47aec12..be1fda7 100644
--- a/src/dmon.c
+++ b/src/dmon.c
@@ -49,7 +49,7 @@
#define DMON_LOG(...) do { \
if (dmon.log) \
- (void)io_fprintln (path_dmon_log, __VA_ARGS__); \
+ io_fprintln (path_dmon_log, __VA_ARGS__); \
} while (0)
#define DMON_ABRT(...) do { \
@@ -131,15 +131,15 @@ daemonize (int status)
/* Redirect standard file descriptors to /dev/null. */
if ((fd = open (_PATH_DEVNULL, O_RDWR, 0)) != -1)
{
- (void)dup2 (fd, STDIN_FILENO);
- (void)dup2 (fd, STDOUT_FILENO);
- (void)dup2 (fd, STDERR_FILENO);
+ dup2 (fd, STDIN_FILENO);
+ dup2 (fd, STDOUT_FILENO);
+ dup2 (fd, STDERR_FILENO);
if (fd > 2)
- (void)close (fd);
+ close (fd);
}
/* Write access for the owner only. */
- (void)umask (0022);
+ umask (0022);
if (!sigs_set_hdlr (SIGINT, dmon_sigs_hdlr)
|| !sigs_set_hdlr (SIGTERM, dmon_sigs_hdlr)