Commit 757eda1
committed
Division by zero risk when restoring the queue
count % q_depth will divide by zero if q_depth is 0 (e.g., after teardown/reconfigure or if init is skipped). Add an explicit guard for q_depth == 0 before the modulo.1 parent a22194d commit 757eda1
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| |||
0 commit comments