summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-11-30 12:57:26 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-11-30 12:57:26 +0100
commit7182c6def360378038c9dc824b7cdf8f3d73a73f (patch)
tree703298652f45ac063837ae79a313e84abb0b21c0 /tools/syslogd.c
parent886ce6653dbc12937fdd80687b167e4323f59ce4 (diff)
downloadrsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.tar.gz
rsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.tar.bz2
rsyslog-7182c6def360378038c9dc824b7cdf8f3d73a73f.zip
silence compiler warnings
the changes do not affect actual code execution, just keep the compile log clean.
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 5882b570..8ffafa6a 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -779,8 +779,11 @@ static void debug_switch()
* a minimal delay, but it is much cleaner than the approach of doing everything
* inside the signal handler.
* rgerhards, 2005-10-26
- * Note: we do not call DBGPRINTF() as this may cause us to block in case something
- * with the threading is wrong.
+ * Note:
+ * - we do not call DBGPRINTF() as this may cause us to block in case something
+ * with the threading is wrong.
+ * - we do not really care about the return state of write(), but we need this
+ * strange check we do to silence compiler warnings (thanks, Ubuntu!)
*/
static void doDie(int sig)
{
@@ -788,11 +791,13 @@ static void doDie(int sig)
# define MSG2 "DoDie called 5 times - unconditional exit\n"
static int iRetries = 0; /* debug aid */
dbgprintf(MSG1);
- if(Debug == DEBUG_FULL)
- write(1, MSG1, sizeof(MSG1) - 1);
+ if(Debug == DEBUG_FULL) {
+ if(write(1, MSG1, sizeof(MSG1) - 1)) {}
+ }
if(iRetries++ == 4) {
- if(Debug == DEBUG_FULL)
- write(1, MSG2, sizeof(MSG2) - 1);
+ if(Debug == DEBUG_FULL) {
+ if(write(1, MSG2, sizeof(MSG2) - 1)) {}
+ }
abort();
}
bFinished = sig;