[med-svn] [aghermann] 05/60: sloppy code is so sloppy in SLoggingClient::log; also, do nothing if facility is NULL
andrei zavada
hmmr-guest at alioth.debian.org
Mon Nov 4 23:49:51 UTC 2013
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch WIP
in repository aghermann.
commit d3e3b35185c8964699b094142a85de5ba4e4ebec
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Mon Sep 30 09:34:28 2013 +0300
sloppy code is so sloppy in SLoggingClient::log; also, do nothing if facility is NULL
---
upstream/src/common/log-facility.cc | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/upstream/src/common/log-facility.cc b/upstream/src/common/log-facility.cc
index 3b21f17..c17fef8 100644
--- a/upstream/src/common/log-facility.cc
+++ b/upstream/src/common/log-facility.cc
@@ -143,14 +143,11 @@ void
agh::log::SLoggingClient::
log( agh::log::TLevel level, const char* issuer, const char* fmt, ...)
{
- va_list ap;
- va_start (ap, fmt);
if (_log_facility) {
+ va_list ap;
+ va_start (ap, fmt);
_log_facility->vmsg( level, issuer, fmt, ap);
- } else {
- printf( "%s %s ", agh::log::level_s(level), issuer);
- vprintf( fmt, ap);
- printf( "\n");
+ va_end (ap);
}
}
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list