negating the if statement to reduce conditional context

This commit is contained in:
Tomsic, Jason 2018-07-06 08:02:07 -04:00
commit 31b92d65ce

View file

@ -1932,8 +1932,9 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
// Open directory.
res = f_opendir(&dir, path);
if (res == FR_OK)
{
if (res != FR_OK)
return res;
dirLength = strlen(path);
for (;;)
{
@ -1977,7 +1978,6 @@ int fix_attributes(char *path, u32 *total, u32 is_root, u32 check_first_run)
}
f_closedir(&dir);
}
return res;
}