From: Thomas Jarosch Date: Mon, 3 Aug 2009 09:26:45 +0000 (+0200) Subject: Fix test for valid pointer after conversion to boost::smart_ptr (The class defines... X-Git-Tag: v1.1~258 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=3a3f3566abc7a5dc2987a3ee54307d1ee781eddf;p=bpdyndnsd Fix test for valid pointer after conversion to boost::smart_ptr (The class defines a bool cast operator to test for a valid pointer) --- 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); }