mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-24 02:42:18 +01:00
test: Remove not needed null check
In ut_report() there is a null check for stats but stats was already dereferenced on the line before and is again dereferenced later in the same function. Also the two places where ut_report() is called from will have initialised the parameter so there is no chance that stats will be null. So to prevent static analysis complaining of a use before check just remove the check. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
parent
996ded5463
commit
aebf3a98bf
@ -687,7 +687,7 @@ void ut_report(struct ut_stats *stats, int run_count)
|
||||
else
|
||||
printf("Tests");
|
||||
printf(" run: %d, ", stats->test_count);
|
||||
if (stats && stats->test_count) {
|
||||
if (stats->test_count) {
|
||||
ulong dur = stats->duration_ms;
|
||||
|
||||
printf("%ld ms, average: %ld ms, ", dur,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user