Skip to content

Commit

Permalink
Fix Uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
moninom1 committed May 10, 2023
1 parent 4aa9dbb commit 37d405e
Show file tree
Hide file tree
Showing 17 changed files with 149 additions and 147 deletions.
4 changes: 2 additions & 2 deletions ff_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static BaseType_t FF_ShortNameExists( FF_IOManager_t * pxIOManager,
if( ( pxFindParams->lFreeEntry < 0 ) && ( ++freeCount == entriesNeeded ) )
{
/* Remember the beginning entry in the sequential sequence. */
pxFindParams->lFreeEntry = ( pxDirEntry->usCurrentItem - ( int32_t )( entriesNeeded - 1 ) );
pxFindParams->lFreeEntry = ( pxDirEntry->usCurrentItem - ( int32_t ) ( entriesNeeded - 1 ) );
}

continue;
Expand Down Expand Up @@ -1143,7 +1143,7 @@ static FF_Error_t FF_Traverse( FF_IOManager_t * pxIOManager,
/* Check if we're past the last cluster ( ulChainLength is also valid for root sectors ). */
if( ( ulClusterNum + 1 ) > pxContext->ulChainLength )
{
xError = FF_createERR(FF_ERR_DIR_END_OF_DIR, FF_TRAVERSE); /* End of Dir was reached! */
xError = FF_createERR( FF_ERR_DIR_END_OF_DIR, FF_TRAVERSE ); /* End of Dir was reached! */
}
else if( ( pxIOManager->xPartition.ucType != FF_T_FAT32 ) &&
( pxContext->ulDirCluster == pxIOManager->xPartition.ulRootDirCluster ) )
Expand Down
4 changes: 2 additions & 2 deletions ff_fat.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ FF_Buffer_t * prvGetFromFATBuffers( FF_IOManager_t * pxIOManager,

if( FF_isERR( xError ) )
{
xError = FF_CreateError(FF_GETERROR( xError ), FF_GETFATENTRY);
xError = FF_CreateError( FF_GETERROR( xError ), FF_GETFATENTRY );
}
else
{
Expand Down Expand Up @@ -1130,7 +1130,7 @@ uint32_t FF_FindFreeCluster( FF_IOManager_t * pxIOManager,
uint32_t ulFATOffset;

ulEntriesPerSector = ( uint32_t ) ( pxIOManager->usSectorSize / xEntrySize );
ulFATOffset = ( uint32_t ) ( ulCluster * xEntrySize );
ulFATOffset = ( uint32_t ) ( ulCluster * xEntrySize );

/* Start from a sector where the first free entry is expected,
* and iterate through every FAT sector. */
Expand Down
20 changes: 10 additions & 10 deletions ff_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,11 +1134,11 @@ int32_t FF_BytesLeft( FF_FILE * pxFile )

if( pxFile == NULL )
{
xReturn = FF_createERR(FF_ERR_NULL_POINTER, FF_BYTESLEFT);
xReturn = FF_createERR( FF_ERR_NULL_POINTER, FF_BYTESLEFT );
}
else if( ( pxFile->ucMode & FF_MODE_READ ) == 0 )
{
xReturn = FF_createERR(FF_ERR_FILE_NOT_OPENED_IN_READ_MODE, FF_BYTESLEFT);
xReturn = FF_createERR( FF_ERR_FILE_NOT_OPENED_IN_READ_MODE, FF_BYTESLEFT );
}
else if( pxFile->ulFilePointer >= pxFile->ulFileSize )
{
Expand All @@ -1149,7 +1149,7 @@ int32_t FF_BytesLeft( FF_FILE * pxFile )
xReturn = pxFile->ulFileSize - pxFile->ulFilePointer;
}

return (int32_t) xReturn;
return ( int32_t ) xReturn;
} /* FF_BytesLeft() */
/*-----------------------------------------------------------*/

Expand Down Expand Up @@ -1737,7 +1737,7 @@ static uint32_t FF_ReadPartial( FF_FILE * pxFile,
* @param pxFile FF_FILE object that was created by FF_Open().
* @param ulElementSize The size of an element to read.
* @param ulCount The number of elements to read.
* @param pucBuffer A pointer to a buffer of adequate size to be filled with the requested data.
* @param pucBuffer A pointer to a buffer of adequate size to be filled with the requested data.
*
* @return Number of bytes read.
*
Expand Down Expand Up @@ -1990,7 +1990,7 @@ int32_t FF_GetC( FF_FILE * pxFile )

if( pxFile == NULL )
{
xResult = FF_createERR(FF_ERR_NULL_POINTER, FF_GETC); /* Ensure this is a signed error. */
xResult = FF_createERR( FF_ERR_NULL_POINTER, FF_GETC ); /* Ensure this is a signed error. */
}
else if( ( pxFile->ucMode & FF_MODE_READ ) == 0 )
{
Expand Down Expand Up @@ -2079,7 +2079,7 @@ int32_t FF_GetLine( FF_FILE * pxFile,
{
/* Although FF_GetC() returns an End Of File,
* the last few characters will be returned first. */
iChar = ( int32_t )xIndex;
iChar = ( int32_t ) xIndex;
}

break;
Expand Down Expand Up @@ -2482,8 +2482,8 @@ int32_t FF_PutC( FF_FILE * pxFile,
FF_Error_t xResult;

if( pxFile == NULL )
{ /* Ensure we don't have a Null file pointer on a Public interface. */
xResult = FF_createERR(FF_ERR_NULL_POINTER, FF_PUTC);
{ /* Ensure we don't have a Null file pointer on a Public interface. */
xResult = FF_createERR( FF_ERR_NULL_POINTER, FF_PUTC );
}
else if( ( pxFile->ucMode & FF_MODE_WRITE ) == 0 )
{
Expand Down Expand Up @@ -3140,7 +3140,7 @@ FF_Error_t FF_Close( FF_FILE * pxFile )

/* Handle Linked list! */
FF_PendSemaphore( pxFile->pxIOManager->pvSemaphore );
{ /* Semaphore is required, or linked list could become corrupted. */
{ /* Semaphore is required, or linked list could become corrupted. */
pxFileChain = ( FF_FILE * ) pxFile->pxIOManager->FirstFile;

if( pxFileChain == pxFile )
Expand Down Expand Up @@ -3329,4 +3329,4 @@ static FF_Error_t FF_Truncate( FF_FILE * pxFile,

return xError;
} /* FF_Truncate() */
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/
10 changes: 5 additions & 5 deletions ff_format.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static FF_Error_t prvFormatWriteBPB( struct xFormatSet * pxSet,

FF_putChar( pxSet->pucSectorBuffer, OFS_BPB_SecPerClus_8, ( uint32_t ) pxSet->ulSectorsPerCluster ); /* 0x00D / Only 1, 2, 4, 8, 16, 32, 64, 128 */
FF_PRINTF( "FF_Format: SecCluster %u DatSec %u DataClus %u pxSet->ulClusterBeginLBA %lu\n",
(unsigned) pxSet->ulSectorsPerCluster, (unsigned) pxSet->ulUsableDataSectors, (unsigned) pxSet->ulUsableDataClusters, pxSet->ulClusterBeginLBA );
( unsigned ) pxSet->ulSectorsPerCluster, ( unsigned ) pxSet->ulUsableDataSectors, ( unsigned ) pxSet->ulUsableDataClusters, pxSet->ulClusterBeginLBA );

/* This field is the new 32-bit total count of sectors on the volume. */
/* This count includes the count of all sectors in all four regions of the volume */
Expand Down Expand Up @@ -462,7 +462,7 @@ static FF_Error_t prvFormatInitialiseFAT( struct xFormatSet * pxSet,
xReturn = FF_BlockWrite( pxSet->pxIOManager, ( uint32_t ) lFatBeginLBA + pxSet->ulSectorsPerFAT, 1, pxSet->pucSectorBuffer, pdFALSE );
}

FF_PRINTF( "FF_Format: Clearing entire FAT (2 x %u sectors):\n", (unsigned) pxSet->ulSectorsPerFAT );
FF_PRINTF( "FF_Format: Clearing entire FAT (2 x %u sectors):\n", ( unsigned ) pxSet->ulSectorsPerFAT );
{
int32_t addr;

Expand Down Expand Up @@ -637,8 +637,8 @@ FF_Error_t FF_FormatDisk( FF_Disk_t * pxDisk,
}

FF_PRINTF( "FF_Format: Secs %u Rsvd %u Hidden %u Root %u Data %u\n",
(unsigned) xSet.ulSectorCount, (unsigned) xSet.ulFATReservedSectors, (unsigned) xSet.ulHiddenSectors,
(unsigned) xSet.iFAT16RootSectors, (unsigned) xSet.ulSectorCount - xSet.ulNonDataSectors );
( unsigned ) xSet.ulSectorCount, ( unsigned ) xSet.ulFATReservedSectors, ( unsigned ) xSet.ulHiddenSectors,
( unsigned ) xSet.iFAT16RootSectors, ( unsigned ) xSet.ulSectorCount - xSet.ulNonDataSectors );

/*****************************/

Expand Down Expand Up @@ -1008,7 +1008,7 @@ FF_Error_t FF_Partition( FF_Disk_t * pxDisk,

if( ulSummedSizes > 100 )
{
return FF_createERR ( FF_ERR_IOMAN_BAD_MEMSIZE, FF_FORMATPARTITION );
return FF_createERR( FF_ERR_IOMAN_BAD_MEMSIZE, FF_FORMATPARTITION );
}

ulSummedSizes = 100;
Expand Down
Loading

0 comments on commit 37d405e

Please sign in to comment.