Migrate usage of StatusOr::operator bool to StautsOr::ok.

PiperOrigin-RevId: 319931897
Change-Id: I31b4bb71c7eeaf6687a499248bbfbb26c78b94ff
This commit is contained in:
Sandboxed API Team 2020-07-07 00:13:42 -07:00 committed by Copybara-Service
parent 88e9dbf8d4
commit 228f3e7ed1

View File

@ -31,7 +31,7 @@ int main(int argc, char** argv) {
switch (testno) {
case 1: { // Dup and map to static FD
auto buffer_or = sandbox2::Buffer::CreateFromFd(3);
if (!buffer_or) {
if (!buffer_or.ok()) {
return EXIT_FAILURE;
}
auto buffer = std::move(buffer_or).value();
@ -52,7 +52,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
auto buffer_or = sandbox2::Buffer::CreateFromFd(fd);
if (!buffer_or) {
if (!buffer_or.ok()) {
return EXIT_FAILURE;
}
auto buffer = std::move(buffer_or).value();