From 3a3f3566abc7a5dc2987a3ee54307d1ee781eddf Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 3 Aug 2009 11:26:45 +0200 Subject: [PATCH] Fix test for valid pointer after conversion to boost::smart_ptr (The class defines a bool cast operator to test for a valid pointer) --- src/config.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.cpp b/src/config.cpp index 35975ad..1144eff 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -115,7 +115,7 @@ int Config::parse_cmd_line(int argc, char *argv[]) //TODO: convert protocol option to lowercase ServicePtr service = create_service(protocol,host,login,password); - if ( service != NULL ) + if ( service ) Services.push_back(service); else return 1; @@ -209,7 +209,7 @@ int Config::load_service_config_file(const string& full_filename) //protocol = tolower(protocol.c_str()); ServicePtr service = create_service(protocol,host,login,password); - if ( service != NULL ) + if ( service ) { Services.push_back(service); } -- 1.7.1