diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-12-27 22:57:31 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-12-27 22:58:07 +0100 |
commit | 8c3c491d4f419b496ac25f306b4b4ea7966465d7 (patch) | |
tree | 3105d4f9a22619521d4b632265d730ef69373068 /crashrep | |
parent | a8fdb0ba4d83e7df5b8c325aabf4ba2fa28e9545 (diff) |
Some cppcheck cleaning
Change-Id: Iac1c26d031e8196ef93cb403dc60f07e0eef6380
Diffstat (limited to 'crashrep')
-rw-r--r-- | crashrep/source/unx/main.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx index d70780ff4152..652593dd42f4 100644 --- a/crashrep/source/unx/main.cxx +++ b/crashrep/source/unx/main.cxx @@ -336,7 +336,7 @@ bool SendHTTPRequest( if ( pszProxyServer ) sprintf( buffer, - "POST http://%s:%d/soap/servlet/rpcrouter HTTP/1.0\r\n" + "POST http://%s:%u/soap/servlet/rpcrouter HTTP/1.0\r\n" "Content-Type: text/xml; charset=\"utf-8\"\r\n" "Content-Length: %d\r\n" "SOAPAction: \"\"\r\n\r\n", @@ -525,21 +525,19 @@ bool send_crash_report( const boost::unordered_map< string, string >& rSettings static bool append_file( const char *filename, string& rString ) { - char buf[1024]; - bool bSuccess = false; - FILE *fp = fopen( filename, "r" ); if ( fp ) { + char buf[1024]; while (fgets(buf, sizeof(buf), fp) != NULL) { rString.append( buf ); } fclose( fp ); - bSuccess = true; + return true; } - return bSuccess; + return false; } string crash_get_details( const boost::unordered_map< string, string >& rSettings ) |