From ad4f72560627a2d75c71a34f2a37ab1f5a2bf05d Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sat, 21 Apr 2012 14:27:43 +0200 Subject: WaE: crashrep warnings fixed --- crashrep/source/unx/main.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crashrep') 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] ); -- cgit