[med-svn] [aghermann] 01/07: mind your pointers
andrei zavada
hmmr-guest at moszumanska.debian.org
Tue Apr 26 00:18:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch WIP
in repository aghermann.
commit 974930f6ecd26565cd57704ad482b8aeb40285e0
Author: Andrei Zavada <hmmr at frdg>
Date: Mon Apr 25 02:58:03 2016 +0300
mind your pointers
---
upstream/src/common/config-validate.hh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/upstream/src/common/config-validate.hh b/upstream/src/common/config-validate.hh
index 9cc9419..bb24bbf 100644
--- a/upstream/src/common/config-validate.hh
+++ b/upstream/src/common/config-validate.hh
@@ -146,7 +146,8 @@ struct SValidator : IValidator {
return; // leave at default
}
if ( not valf(tmp) ) {
- lo->msg( agh::log::TLevel::warning, LOG_SOURCE_ISSUER, "Bad value for key \"%s\"", key.c_str());
+ if ( lo )
+ lo->msg( agh::log::TLevel::warning, LOG_SOURCE_ISSUER, "Bad value for key \"%s\"", key.c_str());
if ( throw_option == TThrowOption::do_throw )
throw invalid_argument( string("Bad value for \"") + key + "\"");
} else
@@ -193,7 +194,8 @@ get( const libconfig::Config& C,
return; // leave at default
}
if ( tmp < 0 || not valf((size_t)tmp) ) {
- lo->msg( agh::log::TLevel::warning, LOG_SOURCE_ISSUER, "Bad value for key \"%s\"", key.c_str());
+ if (lo)
+ lo->msg( agh::log::TLevel::warning, LOG_SOURCE_ISSUER, "Bad value for key \"%s\"", key.c_str());
if ( throw_option == TThrowOption::do_throw )
throw invalid_argument( string("Bad value for \"") + key + "\"");
} else
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list