From 5236e5602666a06033c2a2323ddd3daccd64acdf Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Sat, 6 May 2023 10:42:53 +1000 Subject: [PATCH] Fix #1929, Remove redundant status check in `CFE_ES_RegisterCDSEx()` --- modules/es/fsw/src/cfe_es_cds.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/es/fsw/src/cfe_es_cds.c b/modules/es/fsw/src/cfe_es_cds.c index e8326efb3..7c9c3c67a 100644 --- a/modules/es/fsw/src/cfe_es_cds.c +++ b/modules/es/fsw/src/cfe_es_cds.c @@ -427,14 +427,7 @@ int32 CFE_ES_RegisterCDSEx(CFE_ES_CDSHandle_t *HandlePtr, size_t UserBlockSize, CFE_ES_WriteToSysLog("%s: Failed to update CDS Registry (Stat=0x%08X)\n", __func__, (unsigned int)RegUpdateStatus); - /* - * Return failure only if this was the primary error, - * do not overwrite a preexisting error. - */ - if (Status == CFE_SUCCESS) - { - Status = RegUpdateStatus; - } + Status = RegUpdateStatus; } if (Status == CFE_SUCCESS && !IsNewOffset)