]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pipebackend: fix var shadowing
authorChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 7 Oct 2016 00:41:13 +0000 (02:41 +0200)
committerChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 7 Oct 2016 00:41:13 +0000 (02:41 +0200)
modules/pipebackend/pipebackend.cc

index 98ec55297ec3c9f7c27ee8107766f52c1d8420dc..03e2a6c918d9ed05eb169ddf97a851ed272096f7 100644 (file)
@@ -223,9 +223,7 @@ bool PipeBackend::list(const DNSName& target, int inZoneId, bool include_disable
 
 string PipeBackend::directBackendCmd(const string &query) {
   if (d_abiVersion < 5)
-    return "not supported on ABI version " + std::to_string(d_abiVersion) + "(use ABI version 5 or later)\n";
-
-  ostringstream oss;
+    return "not supported on ABI version " + std::to_string(d_abiVersion) + " (use ABI version 5 or later)\n";
 
   try {
     launch();
@@ -237,8 +235,8 @@ string PipeBackend::directBackendCmd(const string &query) {
     L<<Logger::Error<<kBackendId<<" Error from coprocess: "<<ae.reason<<endl;
     cleanup();
   }
-  oss.str("");
 
+  ostringstream oss;
   while(true) {
     string line;
     d_coproc->receive(line);