Skip to content

Commit

Permalink
Merge pull request #1373 from jphickey/fix-1338-check-status
Browse files Browse the repository at this point in the history
Fix #1338, check status of call to CFE_ES_CDS_CachePreload
  • Loading branch information
astrogeco authored Apr 28, 2021
2 parents 53db85c + 85bfba2 commit 069646d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/es/fsw/src/cfe_es_cds.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,11 @@ int32 CFE_ES_ClearCDS(void)
size_t RemainSize;
int32 Status;

Status = CFE_SUCCESS;

/* Clear the CDS to ensure everything is gone */
/* Create a block of zeros to write to the CDS */
Status = CFE_ES_CDS_CachePreload(&CDS->Cache, NULL, 0, sizeof(CDS->Cache.Data.Zero));
CFE_ES_CDS_CachePreload(&CDS->Cache, NULL, 0, sizeof(CDS->Cache.Data.Zero));

/* While there is space to write another block of zeros, then do so */
while (CDS->Cache.Offset < CDS->TotalSize)
Expand Down

0 comments on commit 069646d

Please sign in to comment.