Skip to content

Commit

Permalink
Fix #357, Remove unnecessary parentheses around return values.
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Sep 27, 2022
1 parent de5ed1e commit 3c37ffb
Show file tree
Hide file tree
Showing 24 changed files with 135 additions and 135 deletions.
12 changes: 6 additions & 6 deletions fsw/mcp750-vxworks/src/bsp-integration/cfeSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int startCfeCore(char *cfevolume, char *cfepath)
if (cfevolume == NULL || cfepath == NULL)
{
printf("Error: No cFE volume or path/filename given.\n");
return (-1);
return -1;
}

/*
Expand All @@ -113,7 +113,7 @@ int startCfeCore(char *cfevolume, char *cfepath)
if (fd < 0)
{
printf("Error: Cannot open cFE core file: %s!\n", cfeCorePath);
return (-1);
return -1;
}
else
{
Expand All @@ -128,7 +128,7 @@ int startCfeCore(char *cfevolume, char *cfepath)
{
printf("Error: Cannot load cFE core module.\n");
close(fd);
return (-1);
return -1;
}
else
{
Expand All @@ -151,7 +151,7 @@ int startCfeCore(char *cfevolume, char *cfepath)
if (status == ERROR)
{
printf("Error: Cannot locate CFE_PSP_Main or OS_BSPMain symbols.\n");
return (-1);
return -1;
}
}

Expand All @@ -164,7 +164,7 @@ int startCfeCore(char *cfevolume, char *cfepath)
/*
** Return to the vxWorks shell
*/
return (0);
return 0;
}

/******************************************************************************
Expand Down Expand Up @@ -248,5 +248,5 @@ int CFE_PSP_InitFlashDisk(void)

} /* end if */

return (Status);
return Status;
}
18 changes: 9 additions & 9 deletions fsw/mcp750-vxworks/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int32 CFE_PSP_GetCDSSize(uint32 *SizeOfCDS)
*SizeOfCDS = CFE_PSP_ReservedMemoryMap.CDSMemory.BlockSize;
return_code = CFE_PSP_SUCCESS;
}
return (return_code);
return return_code;
}

/******************************************************************************
Expand Down Expand Up @@ -148,7 +148,7 @@ int32 CFE_PSP_WriteToCDS(const void *PtrToDataToWrite, uint32 CDSOffset, uint32

} /* end if PtrToDataToWrite == NULL */

return (return_code);
return return_code;
}

/******************************************************************************
Expand Down Expand Up @@ -191,7 +191,7 @@ int32 CFE_PSP_ReadFromCDS(void *PtrToDataToRead, uint32 CDSOffset, uint32 NumByt

} /* end if PtrToDataToWrite == NULL */

return (return_code);
return return_code;
}

/*
Expand Down Expand Up @@ -229,7 +229,7 @@ int32 CFE_PSP_GetResetArea(cpuaddr *PtrToResetArea, uint32 *SizeOfResetArea)
return_code = CFE_PSP_SUCCESS;
}

return (return_code);
return return_code;
}

/*
Expand Down Expand Up @@ -266,7 +266,7 @@ int32 CFE_PSP_GetUserReservedArea(cpuaddr *PtrToUserArea, uint32 *SizeOfUserArea
return_code = CFE_PSP_SUCCESS;
}

return (return_code);
return return_code;
}

/*
Expand Down Expand Up @@ -303,7 +303,7 @@ int32 CFE_PSP_GetVolatileDiskMem(cpuaddr *PtrToVolDisk, uint32 *SizeOfVolDisk)
return_code = CFE_PSP_SUCCESS;
}

return (return_code);
return return_code;
}

/*
Expand Down Expand Up @@ -339,7 +339,7 @@ int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType)
CFE_PSP_ReservedMemoryMap.BootPtr->bsp_reset_type = CFE_PSP_RST_TYPE_PROCESSOR;
}
return_code = CFE_PSP_SUCCESS;
return (return_code);
return return_code;
}

/******************************************************************************
Expand Down Expand Up @@ -466,7 +466,7 @@ int32 CFE_PSP_GetKernelTextSegmentInfo(cpuaddr *PtrToKernelSegment, uint32 *Size
return_code = CFE_PSP_SUCCESS;
}

return (return_code);
return return_code;
}

/******************************************************************************
Expand Down Expand Up @@ -548,5 +548,5 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
}
}

return (return_code);
return return_code;
}
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/src/cfe_psp_ssr.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ int32 CFE_PSP_InitSSR(uint32 bus, uint32 device, char *DeviceName)
ReturnCode = CFE_PSP_SUCCESS;
}

return (ReturnCode);
return ReturnCode;
}
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/src/cfe_psp_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void CFE_PSP_WatchdogService(void)
*/
uint32 CFE_PSP_WatchdogGet(void)
{
return (CFE_PSP_WatchdogValue);
return CFE_PSP_WatchdogValue;
}

/******************************************************************************
Expand Down
18 changes: 9 additions & 9 deletions fsw/modules/eeprom_direct/cfe_psp_eeprom_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ int32 CFE_PSP_EepromWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
/* check 32 bit alignment */
if (MemoryAddress & 0x00000003)
{
return (CFE_PSP_ERROR_ADDRESS_MISALIGNED);
return CFE_PSP_ERROR_ADDRESS_MISALIGNED;
}

/* make the Write */
*((uint32 *)MemoryAddress) = uint32Value;

return (ret_value);
return ret_value;
}

/*
Expand Down Expand Up @@ -119,7 +119,7 @@ int32 CFE_PSP_EepromWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
*/
if (MemoryAddress & 0x00000001)
{
return (CFE_PSP_ERROR_ADDRESS_MISALIGNED);
return CFE_PSP_ERROR_ADDRESS_MISALIGNED;
}

temp32 = uint16Value;
Expand Down Expand Up @@ -179,7 +179,7 @@ int32 CFE_PSP_EepromWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
}
#endif

return (CFE_PSP_EepromWrite32(aligned_address, write32));
return CFE_PSP_EepromWrite32(aligned_address, write32);
}

/*
Expand Down Expand Up @@ -264,7 +264,7 @@ int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue)

#endif

return (CFE_PSP_EepromWrite16(aligned_address, write16));
return CFE_PSP_EepromWrite16(aligned_address, write16);
}

/*
Expand All @@ -288,7 +288,7 @@ int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
*/
int32 CFE_PSP_EepromWriteEnable(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

/*
Expand All @@ -312,7 +312,7 @@ int32 CFE_PSP_EepromWriteEnable(uint32 Bank)
*/
int32 CFE_PSP_EepromWriteDisable(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

/*
Expand All @@ -335,7 +335,7 @@ int32 CFE_PSP_EepromWriteDisable(uint32 Bank)
*/
int32 CFE_PSP_EepromPowerUp(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

/*
Expand All @@ -358,5 +358,5 @@ int32 CFE_PSP_EepromPowerUp(uint32 Bank)
*/
int32 CFE_PSP_EepromPowerDown(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}
26 changes: 13 additions & 13 deletions fsw/modules/eeprom_mmap_file/cfe_psp_eeprom_mmap_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
if (FileDescriptor == -1)
{
OS_printf("CFE_PSP: Cannot open EEPROM File: %s\n", EEPROM_FILE);
return (-1);
return -1;
}
else
{
Expand All @@ -78,7 +78,7 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
{
OS_printf("CFE_PSP: Cannot Seek to end of EEPROM file.\n");
close(FileDescriptor);
return (-1);
return -1;
}

/*
Expand All @@ -88,7 +88,7 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
{
OS_printf("CFE_PSP: Cannot write to EEPROM file\n");
close(FileDescriptor);
return (-1);
return -1;
}
}
}
Expand All @@ -102,7 +102,7 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
{
OS_printf("CFE_PSP: Cannot open EEPROM File: %s\n", EEPROM_FILE);
perror("CFE_PSP: open");
return (-1);
return -1;
}
}

Expand All @@ -113,15 +113,15 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
{
OS_printf("CFE_PSP: mmap to EEPROM File failed\n");
close(FileDescriptor);
return (-1);
return -1;
}

/*
** Return the address to the caller
*/
*EEPROMAddress = (cpuaddr)DataBuffer;

return (0);
return 0;
}

/* For read/write - As this is mmap'ed we dereference the pointer directly.
Expand All @@ -131,39 +131,39 @@ int32 CFE_PSP_SetupEEPROM(uint32 EEPROMSize, cpuaddr *EEPROMAddress)
int32 CFE_PSP_EepromWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
*((uint32 *)MemoryAddress) = uint32Value;
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_EepromWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
*((uint16 *)MemoryAddress) = uint16Value;
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
*((uint8 *)MemoryAddress) = ByteValue;
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_EepromWriteEnable(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromWriteDisable(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromPowerUp(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_EepromPowerDown(uint32 Bank)
{
return (CFE_PSP_SUCCESS);
return CFE_PSP_SUCCESS;
}

void eeprom_mmap_file_Init(uint32 PspModuleId)
Expand Down
14 changes: 7 additions & 7 deletions fsw/modules/eeprom_notimpl/cfe_psp_eeprom_notimpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,35 +38,35 @@ void eeprom_notimpl_Init(uint32 PspModuleId)

int32 CFE_PSP_EepromWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromWriteEnable(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromWriteDisable(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromPowerUp(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}

int32 CFE_PSP_EepromPowerDown(uint32 Bank)
{
return (CFE_PSP_ERROR_NOT_IMPLEMENTED);
return CFE_PSP_ERROR_NOT_IMPLEMENTED;
}
Loading

0 comments on commit 3c37ffb

Please sign in to comment.