Commit 4ecd963
Fix theoretical use of uninitialized values
Clang's static analyzer complains about this.
In get_configs(), if we have an invalid configuration that has no top
level vdevs, we can read a couple of uninitialized variables. Aborting
upon seeing this would break the userland tools for healthy pools, so we
instead initialize the two variables to 0 to allow the userland tools to
continue functioning for the pools with valid configurations.
In zfs_do_wait(), if no wait activities are enabled, we read an
uninitialized error variable.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #140431 parent 219cf0f commit 4ecd963
2 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8554 | 8554 | | |
8555 | 8555 | | |
8556 | 8556 | | |
8557 | | - | |
| 8557 | + | |
8558 | 8558 | | |
8559 | 8559 | | |
8560 | 8560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | | - | |
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | 510 | | |
513 | 511 | | |
514 | 512 | | |
515 | 513 | | |
516 | | - | |
| 514 | + | |
| 515 | + | |
517 | 516 | | |
518 | 517 | | |
519 | 518 | | |
| |||
0 commit comments