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

Unified Diff: src/base/platform/platform-freebsd.cc

Issue 556543004: Unbreak FreeBSD build (hopefully). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform-freebsd.cc
diff --git a/src/base/platform/platform-freebsd.cc b/src/base/platform/platform-freebsd.cc
index 23808f67810ee1b1de6cf8422ab71a3fefc82bb6..507b946f69f57fe001e475169d35256d7070bcd0 100644
--- a/src/base/platform/platform-freebsd.cc
+++ b/src/base/platform/platform-freebsd.cc
@@ -131,14 +131,14 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
addr_buffer[0] = '0';
addr_buffer[1] = 'x';
addr_buffer[10] = 0;
- int result = read(fd, addr_buffer + 2, 8);
- if (result < 8) break;
+ ssize_t bytes_read = read(fd, addr_buffer + 2, 8);
+ if (bytes_read < 8) break;
unsigned start = StringToLong(addr_buffer);
- result = read(fd, addr_buffer + 2, 1);
- if (result < 1) break;
+ bytes_read = read(fd, addr_buffer + 2, 1);
+ if (bytes_read < 1) break;
if (addr_buffer[2] != '-') break;
- result = read(fd, addr_buffer + 2, 8);
- if (result < 8) break;
+ bytes_read = read(fd, addr_buffer + 2, 8);
+ if (bytes_read < 8) break;
unsigned end = StringToLong(addr_buffer);
char buffer[MAP_LENGTH];
int bytes_read = -1;
@@ -146,8 +146,8 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
bytes_read++;
if (bytes_read >= MAP_LENGTH - 1)
break;
- result = read(fd, buffer + bytes_read, 1);
- if (result < 1) break;
+ bytes_read = read(fd, buffer + bytes_read, 1);
+ if (bytes_read < 1) break;
} while (buffer[bytes_read] != '\n');
buffer[bytes_read] = 0;
// Ignore mappings that are not executable.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698