Hi Hans

Ack (review only)

Thanks
Gary




On 11/04/2016, 4:55 PM, "Hans Nordeback" <hans.nordeb...@ericsson.com> wrote:

> osaf/services/saf/amf/amfd/apptype.cc     |   6 ------
> osaf/services/saf/amf/amfd/csiattr.cc     |   8 +-------
> osaf/services/saf/amf/amfd/ctcstype.cc    |   7 -------
> osaf/services/saf/amf/amfd/sg.cc          |   8 --------
> osaf/services/saf/amf/amfd/sg_nway_fsm.cc |   3 ---
> osaf/services/saf/amf/amfd/si_dep.cc      |  10 ++++++----
> osaf/services/saf/amf/amfd/su.cc          |   2 +-
> osaf/services/saf/amf/amfd/sutype.cc      |   6 ------
> 8 files changed, 8 insertions(+), 42 deletions(-)
>
>
>diff --git a/osaf/services/saf/amf/amfd/apptype.cc 
>b/osaf/services/saf/amf/amfd/apptype.cc
>--- a/osaf/services/saf/amf/amfd/apptype.cc
>+++ b/osaf/services/saf/amf/amfd/apptype.cc
>@@ -112,7 +112,6 @@ static AVD_APP_TYPE *apptype_create(SaNa
> {
>       int i = 0;
>       unsigned int j;
>-      int rc = -1;
>       AVD_APP_TYPE *app_type;
>       const SaImmAttrValuesT_2 *attr;
> 
>@@ -131,11 +130,6 @@ static AVD_APP_TYPE *apptype_create(SaNa
>               app_type->sgAmfApptSGTypes.push_back(*((SaNameT 
> *)attr->attrValues[j]));
>       }
> 
>-      rc = 0;
>-
>-      if (rc != 0)
>-              apptype_delete(&app_type);
>-
>       TRACE_LEAVE();
> 
>       return app_type;
>diff --git a/osaf/services/saf/amf/amfd/csiattr.cc 
>b/osaf/services/saf/amf/amfd/csiattr.cc
>--- a/osaf/services/saf/amf/amfd/csiattr.cc
>+++ b/osaf/services/saf/amf/amfd/csiattr.cc
>@@ -340,7 +340,7 @@ static SaAisErrorT csiattr_ccb_completed
>       const SaImmAttrValuesT_2 *attribute;
>       SaNameT csi_dn, csi_attr_name;
>       AVD_CSI *csi;
>-      int attr_counter = 0, add_found = 0, delete_found = 0;
>+      int attr_counter = 0, add_found = 0;
>       unsigned int i = 0;
> 
>       TRACE_ENTER();
>@@ -379,12 +379,6 @@ static SaAisErrorT csiattr_ccb_completed
>               }
>               attribute = &attr_mod->modAttr;
>               if (SA_IMM_ATTR_VALUES_ADD == attr_mod->modType) {
>-                      if (delete_found) {
>-                              report_ccb_validation_error(opdata, "csi attr 
>'%s' modify: no support for mixed ops",
>-                                              opdata->objectName.value);
>-                                goto done;
>-                        }
>-
>                       add_found = 1;
>                       /* We need to varify that csi attr name value pair 
> already exists. */
>                       for (i = 0; i < attribute->attrValuesNumber; i++) {
>diff --git a/osaf/services/saf/amf/amfd/ctcstype.cc 
>b/osaf/services/saf/amf/amfd/ctcstype.cc
>--- a/osaf/services/saf/amf/amfd/ctcstype.cc
>+++ b/osaf/services/saf/amf/amfd/ctcstype.cc
>@@ -96,7 +96,6 @@ AVD_CTCS_TYPE::AVD_CTCS_TYPE(const SaNam
> static AVD_CTCS_TYPE *ctcstype_create(const SaNameT *dn, const 
> SaImmAttrValuesT_2 **attributes)
> {
>       AVD_CTCS_TYPE *ctcstype;
>-      int rc = -1;
>       SaAisErrorT error;
> 
>       TRACE_ENTER2("'%s'", dn->value);
>@@ -116,12 +115,6 @@ static AVD_CTCS_TYPE *ctcstype_create(co
>           SA_AIS_OK)
>               ctcstype->saAmfCtDefNumMaxStandbyCSIs = -1;     /* no limit */
> 
>-      rc = 0;
>-
>-      if (rc != 0) {
>-              delete ctcstype;
>-              ctcstype = nullptr;
>-      }
>       TRACE_LEAVE();
>       return ctcstype;
> }
>diff --git a/osaf/services/saf/amf/amfd/sg.cc 
>b/osaf/services/saf/amf/amfd/sg.cc
>--- a/osaf/services/saf/amf/amfd/sg.cc
>+++ b/osaf/services/saf/amf/amfd/sg.cc
>@@ -258,7 +258,6 @@ static int is_config_valid(const SaNameT
> 
> static AVD_SG *sg_create(const SaNameT *sg_name, const SaImmAttrValuesT_2 
> **attributes)
> {
>-      int rc = -1;
>       AVD_SG *sg;
>       AVD_AMF_SG_TYPE *sgt;
>       SaAisErrorT error;
>@@ -375,13 +374,6 @@ static AVD_SG *sg_create(const SaNameT *
>       /*  TODO use value in type instead? */
>       sg->sg_redundancy_model = sgt->saAmfSgtRedundancyModel;
> 
>-      rc = 0;
>-
>-      if (rc != 0) {
>-              avd_sg_delete(sg);
>-              sg = nullptr;
>-      }
>-
>       TRACE_LEAVE();
>       return sg;
> }
>diff --git a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc 
>b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
>--- a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
>+++ b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
>@@ -1298,9 +1298,6 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
>                                       continue;
>                       }
> 
>-                      if (!curr_su)
>-                              continue;
>-
>                       if ((curr_su->saAmfSuReadinessState == 
> SA_AMF_READINESS_IN_SERVICE) &&
>                           ((curr_su->sg_of_su->saAmfSGMaxActiveSIsperSU == 0) 
> ||
>                            (curr_su->saAmfSUNumCurrActiveSIs < 
> curr_su->sg_of_su->saAmfSGMaxActiveSIsperSU)))
>diff --git a/osaf/services/saf/amf/amfd/si_dep.cc 
>b/osaf/services/saf/amf/amfd/si_dep.cc
>--- a/osaf/services/saf/amf/amfd/si_dep.cc
>+++ b/osaf/services/saf/amf/amfd/si_dep.cc
>@@ -1136,11 +1136,12 @@ static int avd_sidep_indx_init(const SaN
>         memset(sidep_obj, 0, sizeof(AVD_SI_DEP));
>       memcpy(sidep_obj->name.value, &sidep_name->value, sidep_name->length);
> 
>-        /* find first occurence and step past it */
>-        p = strstr((char *)tmp.value, "safSi=") + 1;
>+        /* find first occurrence and step past it */
>+        p = strstr((char *)tmp.value, "safSi=");
>         if (p == nullptr) return false;
>+        p++;
> 
>-        /* find second occurence, an error if not found */
>+        /* find second occurrence, an error if not found */
>         p = strstr(p, "safSi=");
>         if (p == nullptr) return false;
> 
>@@ -1149,8 +1150,9 @@ static int avd_sidep_indx_init(const SaN
>       sidep_obj->dep_name.length = snprintf((char 
> *)sidep_obj->dep_name.value, SA_MAX_NAME_LENGTH, "%s", p);
> 
>         /* Skip past the RDN tag */
>-        p = strchr((char *)tmp.value, '=') + 1;
>+        p = strchr((char *)tmp.value, '=');
>         if (p == nullptr) return false;
>+        p++;
> 
>         /*
>          ** Example DN, need to copy to get rid of back slash escaped commas.
>diff --git a/osaf/services/saf/amf/amfd/su.cc 
>b/osaf/services/saf/amf/amfd/su.cc
>--- a/osaf/services/saf/amf/amfd/su.cc
>+++ b/osaf/services/saf/amf/amfd/su.cc
>@@ -323,7 +323,7 @@ static int is_config_valid(const SaNameT
>               }
> 
>               ng_of_sg = avd_ng_get(&saAmfSGSuHostNodeGroup);
>-              if (ng_of_su == nullptr) {
>+              if (ng_of_sg == nullptr) {
>                       report_ccb_validation_error(opdata, "Invalid 
> saAmfSGSuHostNodeGroup '%s' for '%s'",
>                               saAmfSGSuHostNodeGroup.value, dn->value);
>                       return 0;
>diff --git a/osaf/services/saf/amf/amfd/sutype.cc 
>b/osaf/services/saf/amf/amfd/sutype.cc
>--- a/osaf/services/saf/amf/amfd/sutype.cc
>+++ b/osaf/services/saf/amf/amfd/sutype.cc
>@@ -62,7 +62,6 @@ static AVD_SUTYPE *sutype_create(const S
> {
>       const SaImmAttrValuesT_2 *attr;
>       AVD_SUTYPE *sutype;
>-      int rc = 0;
>       unsigned i = 0;
>       SaAisErrorT error;
> 
>@@ -97,11 +96,6 @@ static AVD_SUTYPE *sutype_create(const S
>               TRACE("%s", sutype->saAmfSutProvidesSvcTypes[i].value);
>       }
> 
>-      rc = 0;
>-
>-      if (rc != 0)
>-              sutype_delete(&sutype);
>-
>       TRACE_LEAVE();
> 
>       return sutype;


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to