mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Migrate usage of StatusOr::operator bool
to StautsOr::ok
.
PiperOrigin-RevId: 319931897 Change-Id: I31b4bb71c7eeaf6687a499248bbfbb26c78b94ff
This commit is contained in:
parent
88e9dbf8d4
commit
228f3e7ed1
|
@ -31,7 +31,7 @@ int main(int argc, char** argv) {
|
||||||
switch (testno) {
|
switch (testno) {
|
||||||
case 1: { // Dup and map to static FD
|
case 1: { // Dup and map to static FD
|
||||||
auto buffer_or = sandbox2::Buffer::CreateFromFd(3);
|
auto buffer_or = sandbox2::Buffer::CreateFromFd(3);
|
||||||
if (!buffer_or) {
|
if (!buffer_or.ok()) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
auto buffer = std::move(buffer_or).value();
|
auto buffer = std::move(buffer_or).value();
|
||||||
|
@ -52,7 +52,7 @@ int main(int argc, char** argv) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
auto buffer_or = sandbox2::Buffer::CreateFromFd(fd);
|
auto buffer_or = sandbox2::Buffer::CreateFromFd(fd);
|
||||||
if (!buffer_or) {
|
if (!buffer_or.ok()) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
auto buffer = std::move(buffer_or).value();
|
auto buffer = std::move(buffer_or).value();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user