summaryrefslogtreecommitdiff
path: root/crashrep/source
diff options
context:
space:
mode:
authorDavid Ostrovsky <David.Ostrovsky@gmx.de>2012-04-21 14:27:43 +0200
committerCaolán McNamara <caolanm@redhat.com>2012-04-21 21:42:39 +0100
commitad4f72560627a2d75c71a34f2a37ab1f5a2bf05d (patch)
tree95f65278d3c7f924d765225b5ef43352b2f561f8 /crashrep/source
parent2496eb6fd40ed6d91bdbc4a85e5b30b1afc707d1 (diff)
WaE: crashrep warnings fixed
Diffstat (limited to 'crashrep/source')
-rw-r--r--crashrep/source/unx/main.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index f9a6320fb272..d4c17bd461ed 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -592,7 +592,11 @@ static void setup_program_dir( const char* progname )
g_strProgramDir = aDir.substr( 0, pos + 1 );
aDir.erase( pos );
- chdir( aDir.c_str() );
+ int ret = chdir( aDir.c_str() );
+ if (!ret)
+ {
+ return;
+ }
}
}
@@ -1051,7 +1055,11 @@ static bool get_accessibility_state()
int main( int argc, char** argv )
{
- freopen( "/dev/null", "w", stderr );
+ FILE *fin = freopen( "/dev/null", "w", stderr );
+ if (!fin)
+ {
+ return -1;
+ }
setup_program_dir( argv[0] );