From d5b689e7af360245691e1801196d912e8774408f Mon Sep 17 00:00:00 2001 From: nealsid Date: Mon, 26 Apr 2010 23:52:50 +0000 Subject: Patch from Zhurun to fix build breaks in gcc 4.4.1 CR URL: http://breakpad.appspot.com/100001/show A=Zhurun R=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@573 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/minidump_file_writer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc index 354ffc90..1be3f504 100644 --- a/src/client/minidump_file_writer.cc +++ b/src/client/minidump_file_writer.cc @@ -68,7 +68,9 @@ bool MinidumpFileWriter::Close() { bool result = true; if (file_ != -1) { - ftruncate(file_, position_); + if (-1 == ftruncate(file_, position_)) { + return false; + } #if __linux__ result = (sys_close(file_) == 0); #else -- cgit v1.2.1