[PATCH] Fix rtconfig's Junos generator to not output null bytes

Faidon Liambotis paravoid at debian.org
Sun Jul 5 02:13:38 UTC 2009


There were some unneeded  "fooout << ends" in the code that resulted in
null bytes (IOW, garbage) in the output.
---
 src/rtconfig/f_junos.cc |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/rtconfig/f_junos.cc b/src/rtconfig/f_junos.cc
index e2febac..8aa46c2 100644
--- a/src/rtconfig/f_junos.cc
+++ b/src/rtconfig/f_junos.cc
@@ -363,7 +363,6 @@ int JunosConfig::printRE(ostream& os, const regexp& r) {
    bool hasBOL = false;
    bool hasEOL = false;
    printRE_(out, r, hasBOL, hasEOL);
-   out << ends;
    
    if (!hasBOL)
       os << ".* ";
@@ -600,12 +599,9 @@ ListOf2Ints *JunosConfig::printCommunities(FilterOfCommunity& cm) {
 	   << "   policy-statement community-pol-inner-" 
 	   << aclID << "-" << 1 << " {\n";
 
-      midCout << ends;
       cout << midCout.str();
-      
       cout << "   }\n\n";
    
-      lastCout << ends;
       cout << "\n" << lastCout.str();
 
       for (int i = 1; i <= count; ++i)
@@ -615,10 +611,7 @@ ListOf2Ints *JunosConfig::printCommunities(FilterOfCommunity& cm) {
 	      << "         then accept;\n"
 	      << "      }\n";
    } else {
-      lastCout << ends;
       cout << "\n" << lastCout.str();
-
-      midCout << ends;
       cout << midCout.str();
    }      
 
-- 
1.5.6.5




More information about the irrtoolset mailing list