Skip to content

Commit

Permalink
Fix nasa#70, fix comment stlye
Browse files Browse the repository at this point in the history
  • Loading branch information
zanzaben committed Feb 23, 2021
1 parent 6d1d12e commit 957863f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,14 +941,14 @@ int32 ProcessCmdLineOptions(int ArgumentCount, char *Arguments[])
{
if ((Arguments[i][0] == '-') && (Arguments[i][1] == 't'))
{
// Extract the Table Name Override
/* Extract the Table Name Override */
strncpy(TableName, &Arguments[i][2], sizeof(TableName) - 1);
TableName[sizeof(TableName) - 1] = 0;
TableNameOverride = true;
}
else if ((Arguments[i][0] == '-') && (Arguments[i][1] == 'd'))
{
// Extract the Description Override
/* Extract the Description Override */
strncpy(Description, &Arguments[i][2], sizeof(Description) - 1);
Description[sizeof(Description) - 1] = 0;
DescriptionOverride = true;
Expand Down Expand Up @@ -1407,7 +1407,7 @@ int32 OpenSrcFile(void)
int RtnCode;
char TimeBuff[50];

// Check to see if input file can be found and opened
/* Check to see if input file can be found and opened */
SrcFileDesc = fopen(SrcFilename, "r");

if (SrcFileDesc == NULL)
Expand Down Expand Up @@ -1443,7 +1443,7 @@ int32 OpenDstFile(void)
{
struct stat dststat;

// Check to see if output file can be opened and written
/* Check to see if output file can be opened and written */
DstFileDesc = fopen(DstFilename, "w");

if (DstFileDesc == NULL)
Expand Down Expand Up @@ -1489,7 +1489,7 @@ int32 GetElfHeader(void)
return FAILED;
}

// Begin by reading e_ident characters
/* Begin by reading e_ident characters */
NumHdrsRead = fread(&ElfHeader, EI_NIDENT, 1, SrcFileDesc);

if (NumHdrsRead != 1)
Expand Down Expand Up @@ -1614,7 +1614,7 @@ int32 GetElfHeader(void)
if (Verbose)
printf(" e_ident[EI_VERSION] = %d\n", get_e_ident(&ElfHeader, EI_VERSION));

// Now that e_ident is processed (with word size), read rest of the header
/* Now that e_ident is processed (with word size), read rest of the header */
if (TargetWordsizeIs32Bit)
{
NumHdrsRead = fread(&(ElfHeader.Ehdr32.e_type), sizeof(Elf32_Ehdr) - EI_NIDENT, 1, SrcFileDesc);
Expand Down Expand Up @@ -2266,7 +2266,7 @@ int32 GetTblDefInfo(void)
}
else
{
// fseek expects a long int, sh_offset and st_value are uint64 for elf64
/* fseek expects a long int, sh_offset and st_value are uint64 for elf64 */
uint64_t calculated_offset = get_sh_offset(SectionHeaderPtrs[get_st_shndx(SymbolPtrs[TblDefSymbolIndex])]) +
get_st_value(SymbolPtrs[TblDefSymbolIndex]);
SeekOffset = (uint32_t)(calculated_offset);
Expand Down

0 comments on commit 957863f

Please sign in to comment.