Skip to content

Commit

Permalink
examples/lte_azureiot: Minor update the usage of stat()
Browse files Browse the repository at this point in the history
Minor update the usage of stat() function.
  • Loading branch information
SPRESENSE committed Jul 5, 2022
1 parent 99cadb0 commit 5d86680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/lte_azureiot/lte_azureiot_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,12 @@ static int filelength(const char *file_name)
return ERROR;
}

if ((st.st_mode & S_IFMT) != S_IFREG)
if (!S_ISREG(st.st_mode))
{
return ERROR;
}

return st.st_size;
return (int)st.st_size;
}

/* ------------------------------------------------------------------------ */
Expand Down

0 comments on commit 5d86680

Please sign in to comment.