diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 19:07:50 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 19:07:50 +0000 |
commit | aef150e1ca4a44f9dedb8e98ad7bc56ad82d1000 (patch) | |
tree | 745347cdfe4e72f9a34d1336f2dddacf5c91319b /chrome | |
parent | 999b7747aae6f8f2c3a52cf158a273cf886206a0 (diff) | |
download | chromium_src-aef150e1ca4a44f9dedb8e98ad7bc56ad82d1000.zip chromium_src-aef150e1ca4a44f9dedb8e98ad7bc56ad82d1000.tar.gz chromium_src-aef150e1ca4a44f9dedb8e98ad7bc56ad82d1000.tar.bz2 |
Check result on fstat call.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/504082
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/transport_dib_mac.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/common/transport_dib_mac.cc b/chrome/common/transport_dib_mac.cc index 59b9433..63c38cf 100644 --- a/chrome/common/transport_dib_mac.cc +++ b/chrome/common/transport_dib_mac.cc @@ -8,6 +8,7 @@ #include <sys/stat.h> #include "base/eintr_wrapper.h" +#include "base/logging.h" #include "base/shared_memory.h" #include "skia/ext/platform_canvas.h" @@ -40,7 +41,8 @@ TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { TransportDIB* TransportDIB::Map(TransportDIB::Handle handle) { TransportDIB* dib = new TransportDIB(handle); struct stat st; - fstat(handle.fd, &st); + int result = fstat(handle.fd, &st); + DCHECK_EQ(result, 0) << "fstat failed"; if (!dib->shared_memory_.Map(st.st_size)) { delete dib; |