SimpleShell: cat: use puts instead of printf("%s") for efficiency
authorMichael Moon <triffid.hunter@gmail.com>
Wed, 13 Feb 2013 05:59:05 +0000 (16:59 +1100)
committerMichael Moon <triffid.hunter@gmail.com>
Wed, 13 Feb 2013 05:59:05 +0000 (16:59 +1100)
src/modules/utils/simpleshell/SimpleShell.cpp

index 10edd90..8dd5b9e 100644 (file)
@@ -120,7 +120,7 @@ void SimpleShell::cat_command( string parameters, StreamOutput* stream ){
         buffer.append((char *)&c, 1);
         if( char(c) == '\n' ){
             newlines++;
-            stream->printf("%s", buffer.c_str());
+            stream->puts(buffer.c_str());
             buffer.clear();
         }
         if( newlines == limit ){ break; }