summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:29:40 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:29:40 +0000
commit57d1e4420d7f7981a5e55ad5f66cb1534af30851 (patch)
tree7de98d0106a3940da1e3c5eb773d5a1de186a905 /main.cc
parentAdding upstream version 1.1. (diff)
downloadzutils-57d1e4420d7f7981a5e55ad5f66cb1534af30851.tar.xz
zutils-57d1e4420d7f7981a5e55ad5f66cb1534af30851.zip
Adding upstream version 1.2~pre2.upstream/1.2_pre2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.cc b/main.cc
index e6d2d18..04956b6 100644
--- a/main.cc
+++ b/main.cc
@@ -275,7 +275,7 @@ int main( const int argc, const char * const argv[] )
for( ; argind < parser.arguments(); ++argind )
{
const int code = parser.code( argind );
- const char * arg = parser.argument( argind ).c_str();
+ const char * const arg = parser.argument( argind ).c_str();
if( !code )
{
if( program_mode == m_zgrep && !grep_pattern_found )
@@ -399,7 +399,7 @@ int main( const int argc, const char * const argv[] )
if( recursive )
{
struct stat st;
- if( !stat( input_filename.c_str(), &st ) && S_ISDIR( st.st_mode ) )
+ if( stat( input_filename.c_str(), &st ) == 0 && S_ISDIR( st.st_mode ) )
{
DIR * const dirp = opendir( input_filename.c_str() );
if( !dirp )