]> granicus.if.org Git - pdns/commitdiff
make arguments parser for configuration file strip trailing spaces and tabs better
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Jul 2008 20:20:08 +0000 (20:20 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Jul 2008 20:20:08 +0000 (20:20 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1242 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/arguments.cc

index f67f671166e38a643b04d884c40a1d847eb87564..5b8b624965102d3d9328de9a217762bc5dfa0220 100644 (file)
@@ -317,10 +317,7 @@ bool ArgvMap::file(const char *fname, bool lax)
       line=line.substr(0,pos);
 
     // strip trailing spaces
-    trim_right(line);
-    // strip leading spaces
-    if((pos=line.find_first_not_of(" \t\r\n"))!=string::npos)
-      line=line.substr(pos);
+    trim(line);
 
     parseOne(string("--")+line,"",lax);
     line="";