What changed, and why it matters
This commit simply removes a software function named delay_is_elapsed that is no longer used anywhere in the code. It is a routine cleanup change with no apparent security relevance.
No security action needed. Treat as normal code-cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes the delay_is_elapsed() implementation in src/delay.c, its prototype in src/delay.h, and its bindgen allowlist entry in src/rust/bitbox02-sys/build.rs. The function checked whether a non-blocking delay task was marked done and cleared the task slot when true. No callers remain, so this is dead-code removal. The change does not alter active behavior or fix a vulnerability.
Changed components
src/delay.csrc/delay.hsrc/rust/bitbox02-sys/build.rsInspect captured patch +1 / −15
diff --git a/src/delay.c b/src/delay.c
index fb49450..bcdb62c 100644
--- a/src/delay.c
+++ b/src/delay.c
@@ -65,16 +65,6 @@ void delay_init_ms(delay_t* self, uint32_t ms, delay_callback_t cb, void* user_d
self->id = i;
}
-bool delay_is_elapsed(const delay_t* self)
-{
- ASSERT(self->id < COUNT_OF(_tasks));
- if (_tasks[self->id].done) {
- memset(&_tasks[self->id], 0, sizeof(struct task));
- return true;
- }
- return false;
-}
-
void delay_cancel(const delay_t* self)
{
ASSERT(self->id < COUNT_OF(_tasks));
diff --git a/src/delay.h b/src/delay.h
index 1922d59..9444cf8 100644
--- a/src/delay.h
+++ b/src/delay.h
@@ -12,13 +12,10 @@ typedef struct {
typedef void (*delay_callback_t)(void*);
-// Creates a non-blocking delay. Check with delay_is_elapsed if it has elapsed.
+// Creates a non-blocking delay.
// Limited to 10 concurrent delays, will abort if it fails to allocate one
void delay_init_ms(delay_t* self, uint32_t ms, delay_callback_t cb, void* user_data);
-// returns true if time has passed. After it has returned true once it must not be called again
-bool delay_is_elapsed(const delay_t* self);
-
// Cancel delay if you don't intend to check it until it elapses
void delay_cancel(const delay_t* self);
#endif
diff --git a/src/rust/bitbox02-sys/build.rs b/src/rust/bitbox02-sys/build.rs
index 0f1048a..1d91f3c 100644
--- a/src/rust/bitbox02-sys/build.rs
+++ b/src/rust/bitbox02-sys/build.rs
@@ -62,7 +62,6 @@ const ALLOWLIST_FNS: &[&str] = &[
"confirm_transaction_fee_create",
"delay_cancel",
"delay_init_ms",
- "delay_is_elapsed",
"delay_ms",
"delay_us",
"da14531_handler",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.