Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Martin authored and Todd Martin committed Oct 8, 2021
1 parent 355a1dc commit 3ab23ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ut_assert/src/uttools.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ bool UtMem2BinFile(const void *Memory, const char *Filename, uint32 Length)
FILE * fp;
struct stat dststat;

if ((stat(Filename, &dststat) == 0)) {
if ((chmod(Filename, dststat.st_mode & ~(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)) == 0)) {
if ((stat(Filename, &dststat) == 0))
{
if ((chmod(Filename, dststat.st_mode & ~(S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)) == 0))
{
stat(Filename, &dststat);
if ((fp = fopen(Filename, "w"))) {
if ((fp = fopen(Filename, "w")))
{
fwrite(Memory, Length, 1, fp);
fclose(p);
return (true);
Expand Down

0 comments on commit 3ab23ac

Please sign in to comment.