Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(936)

Unified Diff: bin/fdutils_macos.cc

Issue 9194002: Fix failure (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/fdutils_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/fdutils_macos.cc
===================================================================
--- bin/fdutils_macos.cc (revision 3249)
+++ bin/fdutils_macos.cc (working copy)
@@ -39,12 +39,15 @@
intptr_t FDUtils::AvailableBytes(intptr_t fd) {
- size_t available;
+ int available; // ioctl for FIONREAD expects an 'int*' argument.
int result = TEMP_FAILURE_RETRY(ioctl(fd, FIONREAD, &available));
if (result < 0) {
return result;
}
- return available;
+#ifdef DEBUG
+ ASSERT(available >= 0);
+#endif
+ return static_cast<intptr_t>(available);
}
« no previous file with comments | « bin/fdutils_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698