Commit 9793a0e7 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Fix broken opt build due to "error: unused variable 'rv'"

Summary: Fix broken opt build due to "error: unused variable 'rv'"

Reviewed By: yfeldblum

Differential Revision: D8883701

fbshipit-source-id: 2a832cfea0bd9cbca63a8d5c2c8d7127593728af
parent ea29a7a6
......@@ -114,11 +114,11 @@ ssize_t read_all(int fd, uint8_t* buffer, size_t size) {
// Returns the position in the file after done reading.
off_t get_stack_trace(int fd, size_t file_pos, uint8_t* buffer, size_t count) {
off_t rv = lseek(fd, file_pos, SEEK_SET);
assert(rv == (off_t)file_pos);
CHECK_EQ(rv, (off_t)file_pos);
// Subtract 1 from size of buffer to hold nullptr.
ssize_t bytes_read = read_all(fd, buffer, count - 1);
assert(bytes_read > 0);
CHECK_GT(bytes_read, 0);
buffer[bytes_read] = '\0';
return lseek(fd, 0, SEEK_CUR);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment