Skip to content

Commit

Permalink
Fix nasa#1730, Use offsetof as comparison for lseek.
Browse files Browse the repository at this point in the history
  • Loading branch information
zanzaben committed Jul 30, 2021
1 parent 941642d commit fac4f4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/fs_header_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void TestTimeStamp(void)
cFE_FTAssert_VOIDCALL(CFE_FS_InitHeader(&Header, TestDescription, CFE_FS_SubType_ES_ERLOG));
UtAssert_INT32_EQ(CFE_FS_WriteHeader(fd, &Header), sizeof(CFE_FS_Header_t));
UtAssert_INT32_EQ(CFE_FS_SetTimestamp(fd, NewTimestamp), CFE_SUCCESS);
UtAssert_INT32_EQ(OS_lseek(fd, sizeof(Header.Description), OS_SEEK_CUR), sizeof(CFE_FS_Header_t));
UtAssert_INT32_EQ(OS_lseek(fd, 0, OS_SEEK_CUR), (offsetof(CFE_FS_Header_t, TimeSeconds) + sizeof(NewTimestamp)));

UtAssert_INT32_EQ(CFE_FS_ReadHeader(&ReadHeader, fd), sizeof(CFE_FS_Header_t));

Expand Down

0 comments on commit fac4f4a

Please sign in to comment.