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:
parent
8f197c955d
commit
b7d55d8ec6
8 changed files with 26 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue