Commit 55104dd
committed
Prevent memory_reset_hww from masking flash write failures
memory_reset_hww combined the CHUNK_1 write result and the
shared BLE chunk write using |=, so a later successful
write could hide an earlier failure. Change both writes to
be checked individually and return false on the first
failure, making the function only report success when all
flash writes succeed.
Using explicit checks with early returns instead of
changing |= to &= keeps each flash write logically
independent and minimalizes the risk of future confusion.1 parent d8ee94c commit 55104dd
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
| |||
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
385 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| |||
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
409 | 412 | | |
410 | 413 | | |
411 | | - | |
| 414 | + | |
412 | 415 | | |
413 | 416 | | |
414 | 417 | | |
| |||
0 commit comments