Remove double check of fd value.
The output.text.fd value is only ever -1 when there is a failure.
There is no need to check both < 0 or -1, so only check for -1.
Test: Unit tests pass.
Test: Verified the message is seen on intercept and not on
Test: regular crashes.
Change-Id: I1eddcd5d2342b268ceb261b246c98b10cee85bb4
diff --git a/debuggerd/tombstoned/tombstoned.cpp b/debuggerd/tombstoned/tombstoned.cpp
index 02ded1e..50558f7 100644
--- a/debuggerd/tombstoned/tombstoned.cpp
+++ b/debuggerd/tombstoned/tombstoned.cpp
@@ -448,10 +448,8 @@
return;
}
- if (crash->output.text.fd < 0) {
- if (crash->output.text.fd == -1) {
- LOG(WARNING) << "skipping tombstone file creation due to intercept";
- }
+ if (crash->output.text.fd == -1) {
+ LOG(WARNING) << "skipping tombstone file creation due to intercept";
return;
}