osaf/services/saf/amf/amfnd/clc.cc | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
The patch for cleaning code after fix of #1557:
Ensure TRACE_LEAVE2 is called
Remove unused env_attr_val
diff --git a/osaf/services/saf/amf/amfnd/clc.cc
b/osaf/services/saf/amf/amfnd/clc.cc
--- a/osaf/services/saf/amf/amfnd/clc.cc
+++ b/osaf/services/saf/amf/amfnd/clc.cc
@@ -28,7 +28,6 @@
..............................................................................
FUNCTIONS INCLUDED in this module:
-
******************************************************************************
*/
@@ -2755,7 +2754,6 @@ uint32_t avnd_comp_clc_cmd_execute(AVND_
char env_var_name[] = "SA_AMF_COMPONENT_NAME";
char env_var_nodeid[] = "NCS_ENV_NODE_ID";
char env_var_comp_err[] = "OSAF_COMPONENT_ERROR_SOURCE";
- char *env_attr_val = 0;
AVND_CLC_EVT *clc_evt;
AVND_EVT *evt = 0;
AVND_COMP_CLC_INFO *clc_info = &comp->clc_info;
@@ -2774,8 +2772,7 @@ uint32_t avnd_comp_clc_cmd_execute(AVND_
comp->clc_info.exec_cmd = cmd_type;
} else {
TRACE("Another clc cmd of the same type: '%s' is in progress",
clc_cmd_type[cmd_type]);
- TRACE_LEAVE2("%u", rc);
- return rc;
+ goto done;
}
/* the allocated memory is normally freed in comp_clc_resp_callback */
@@ -2806,7 +2803,7 @@ uint32_t avnd_comp_clc_cmd_execute(AVND_
}
delete clc_evt;
- return rc;
+ goto done;
} else {
LOG_ER("Command other than cleanup recvd for ext comp:
Comp and cmd_type are '%s': %u",\
comp->name.value,cmd_type);
@@ -2977,18 +2974,15 @@ uint32_t avnd_comp_clc_cmd_execute(AVND_
// outcome of command is reported in comp_clc_resp_callback()
}
- TRACE_LEAVE2("success");
- return NCSCC_RC_SUCCESS;
+ TRACE_2("success");
+ goto done;
err:
/* free the event */
if (evt)
avnd_evt_destroy(evt);
- if (env_attr_val) {
- /* Free the Memory allocated for CLC command environment Sets */
- delete env_attr_val;
- }
-
+
+ done:
TRACE_LEAVE2("%u", rc);
return rc;
}
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel