Skip to content

Commit d892458

Browse files
committed
SonarQube findings resolution
"volatile" types should not be used in compound operations Issue link: https://sonarcloud.io/project/issues?open=AZWum4f1vizSu0tgQ8GT&id=nrfconnect_sdk-mcuboot Ref: NCSDK-35334 Signed-off-by: Adam Szczygieł <[email protected]>
1 parent 391f093 commit d892458

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot/bootutil/include/bootutil/fault_injection_hardening.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ int fih_delay(void)
160160

161161
delay = fih_delay_random_uchar();
162162

163-
for (volatile int i = 0; i < delay; i++) {
163+
for (volatile int i = 0; i < delay;) {
164+
int tmp = i;
165+
i = tmp + 1;
164166
foo++;
165167
}
166168

0 commit comments

Comments
 (0)