summaryrefslogtreecommitdiffstats
path: root/common_decode.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common_decode.cc')
-rw-r--r--common_decode.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/common_decode.cc b/common_decode.cc
index 6ff3086..595fd7b 100644
--- a/common_decode.cc
+++ b/common_decode.cc
@@ -18,19 +18,13 @@
#define _FILE_OFFSET_BITS 64
#include <cerrno>
-#include <climits>
#include <cstdio>
#include <cstdlib>
-#include <cstring>
#include <ctime>
-#include <string>
-#include <vector>
-#include <pthread.h> // for tarlz.h
-#include <stdint.h>
#include <sys/stat.h>
-#include "arg_parser.h"
#include "tarlz.h"
+#include "arg_parser.h"
namespace {
@@ -146,7 +140,7 @@ bool format_member_name( const Extended & extended, const Tar_header header,
else
offset += snprintf( rbuf() + offset, rbuf.size() - offset, " %9llu",
extended.file_size() );
- for( int i = 0; i < 2; ++i )
+ for( int i = 0; i < 2; ++i ) // resize rbuf if not large enough
{
const int len = snprintf( rbuf() + offset, rbuf.size() - offset,
" %4d-%02u-%02u %02u:%02u %s%s%s\n",
@@ -186,7 +180,7 @@ bool check_skip_filename( const Cl_options & cl_opts,
const char * const filename )
{
if( Exclude::excluded( filename ) ) return true; // skip excluded files
- bool skip = cl_opts.filenames > 0;
+ bool skip = cl_opts.num_files > 0;
if( skip )
for( int i = 0; i < cl_opts.parser.arguments(); ++i )
if( nonempty_arg( cl_opts.parser, i ) )