style: tests: comply with MISRA C:2012 Rule 15.6

Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2024-08-16 13:35:07 +07:00 committed by Henrik Brix Andersen
commit b7d55d8ec6
8 changed files with 26 additions and 13 deletions

View file

@ -145,8 +145,9 @@ static int test_file_fsync(void)
{
int res = 0;
if (file < 0)
if (file < 0) {
return res;
}
res = fsync(file);
if (res < 0) {
@ -184,8 +185,9 @@ static int test_file_truncate(void)
int res = 0;
size_t truncate_size = sizeof(test_str) - 4;
if (file < 0)
if (file < 0) {
return res;
}
res = ftruncate(file, truncate_size);
if (res) {