Skip to content

Commit

Permalink
avoid redundancy
Browse files Browse the repository at this point in the history
  • Loading branch information
axel-h committed Jun 28, 2024
1 parent 27288a9 commit a35c2e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/object/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,15 @@ void handleInterrupt(irq_t irq)
return;
}

switch (intStateIRQTable[IRQT_TO_IDX(irq)]) {
word_t idx = IRQT_TO_IDX(irq);

switch (intStateIRQTable[idx]) {
case IRQSignal: {
/* Merging the variable declaration and initialization into one line
* requires an update in the proofs first. Might be a c89 legacy.
*/
cap_t cap;
cap = intStateIRQNode[IRQT_TO_IDX(irq)].cap;
cap = intStateIRQNode[idx].cap;
if (cap_get_capType(cap) == cap_notification_cap &&
cap_notification_cap_get_capNtfnCanSend(cap)) {
sendSignal(NTFN_PTR(cap_notification_cap_get_capNtfnPtr(cap)),
Expand Down

0 comments on commit a35c2e9

Please sign in to comment.