Aristarkh Zagorodnikov avatar Aristarkh Zagorodnikov committed eaad8ee

Minor error logging cleanup

Comments (0)

Files changed (1)

gridfs/mod_gridfs.cpp

 	}
 	request->filename = const_cast<char *>(filename);
 	const std::string& database = *config->database;
-	int result;
 	apr_bucket_brigade *brigade = 0;
 	try
 	{
 						const char *chunk_data = chunk.data(chunk_length);
 						if (chunk_length == 0)
 							continue;
-						if ((result = apr_brigade_write(brigade, 0, 0, chunk_data, chunk_length)) != APR_SUCCESS)
+						const int result = apr_brigade_write(brigade, 0, 0, chunk_data, chunk_length);
+						if (result != APR_SUCCESS)
 						{
 							connection->done();
 							ap_log_rerror(APLOG_MARK, APLOG_ERR, result, request, "mod_gridfs: Failed to write chunk %d for file '%s' to brigade (length: %d).", chunk_index, filename, chunk_length); 
 		if (content_type.empty())
 		{
 			request->finfo.filetype = APR_REG;
-			if ((result = ap_run_type_checker(request)) != APR_SUCCESS)
+			const int result = ap_run_type_checker(request);
+			if (result != APR_SUCCESS)
 				ap_log_rerror(APLOG_MARK, APLOG_WARNING, result, request, "mod_gridfs: Failed to run type checker for file '%s'.", filename); 
 		}
 		else
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.