diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-28 10:19:29 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-28 10:19:29 +0100 |
commit | e581c3d26ef7fc954bd271b348663a9e5e735ea5 (patch) | |
tree | 3a1ef3a5affd9f99ebdbafa171c26f8a6d15f2bb /runtime/debug.c | |
parent | aaeb1945a7b7f8534edc04a03912c7942322fb83 (diff) | |
parent | f161dfefd2455547847f0355b7a3a87063780a43 (diff) | |
download | rsyslog-e581c3d26ef7fc954bd271b348663a9e5e735ea5.tar.gz rsyslog-e581c3d26ef7fc954bd271b348663a9e5e735ea5.tar.bz2 rsyslog-e581c3d26ef7fc954bd271b348663a9e5e735ea5.zip |
Merge branch 'v7-stable'
Conflicts:
doc/imptcp.html
plugins/mmjsonparse/mmjsonparse.c
plugins/mmnormalize/mmnormalize.c
Diffstat (limited to 'runtime/debug.c')
-rw-r--r-- | runtime/debug.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/debug.c b/runtime/debug.c index 307a8bb8..1d306dbd 100644 --- a/runtime/debug.c +++ b/runtime/debug.c @@ -902,8 +902,12 @@ do_dbgprint(uchar *pszObjName, char *pszMsg, size_t lenMsg) lenCopy = lenMsg; memcpy(pszWriteBuf + offsWriteBuf, pszMsg, lenCopy); offsWriteBuf += lenCopy; - if(stddbg != -1) write(stddbg, pszWriteBuf, offsWriteBuf); - if(altdbg != -1) write(altdbg, pszWriteBuf, offsWriteBuf); + /* the write is included in an "if" just to silence compiler + * warnings. Here, we really don't care if the write fails, we + * have no good response to that in any case... -- rgerhards, 2012-11-28 + */ + if(stddbg != -1) if(write(stddbg, pszWriteBuf, offsWriteBuf)){}; + if(altdbg != -1) if(write(altdbg, pszWriteBuf, offsWriteBuf)){}; bWasNL = (pszMsg[lenMsg - 1] == '\n') ? 1 : 0; } |