see subject
Index: services/amfutil.c
===================================================================
--- services/amfutil.c	(revision 1821)
+++ services/amfutil.c	(working copy)
@@ -1338,7 +1338,7 @@
 #endif
 
 
-int sa_amf_grep(const char *string, char *pattern, size_t nmatch,
+int sa_amf_grep(const char *string, const char *pattern, size_t nmatch,
 	SaNameT *matches_arr)
 {
 	int             status;
Index: services/amf.h
===================================================================
--- services/amf.h	(revision 1822)
+++ services/amf.h	(working copy)
@@ -815,7 +815,7 @@
 
 /* General methods */
 extern struct amf_sg *amf_sg_find (struct amf_application *app, char *name);
-extern struct amf_sg *amf_sg_new (struct amf_application *app, char *name);
+extern struct amf_sg *amf_sg_new (struct amf_application *app, const char *name);
 extern void amf_sg_delete (struct amf_sg *sg);
 extern void *amf_sg_serialize (struct amf_sg *sg, int *len);
 extern struct amf_sg *amf_sg_deserialize (
@@ -1195,17 +1195,14 @@
 	struct amf_csi_attribute *csi_attribute, int *len);
 extern struct amf_csi_attribute *amf_csi_attribute_deserialize (
 	struct amf_csi *csi, char *buf);
-/* extern int sa_amf_grep(const char *string, char *pattern, size_t nmatch, */
-/*	char** sub_match_array);                                             */
-
-extern int sa_amf_grep(const char *string, char *pattern, size_t nmatch,
+extern int sa_amf_grep(const char *string, const char *pattern, size_t nmatch,
 	SaNameT *sub_match_array);
 
 /*===========================================================================*/
 extern struct amf_node *this_amf_node;
 extern struct amf_cluster *amf_cluster;
 
-static inline int name_match(SaNameT *name1, SaNameT *name2)
+static inline int name_match(const SaNameT *name1, const SaNameT *name2)
 {
 	if (name1->length == name2->length) {
 		return ((strncmp ((char *)name1->value, (char *)name2->value, name1->length)) == 0);
Index: services/amfsg.c
===================================================================
--- services/amfsg.c	(revision 1792)
+++ services/amfsg.c	(working copy)
@@ -2120,9 +2120,11 @@
 int amf_sg_start (struct amf_sg *sg, struct amf_node *node)
 {
 
+	int instantiated_sus = 0;
+
 	sg->recovery_scope.event_type = SG_START_EV;
+
 	ENTER ();
-	int instantiated_sus = 0;
 
 	switch (sg->avail_state) {
 		case SG_AC_InstantiatingServiceUnits:
@@ -2219,9 +2221,10 @@
  */
 void amf_sg_failover_node_req (struct amf_sg *sg, struct amf_node *node) 
 {
-	ENTER();
 	sg_event_t sg_event;
 
+	ENTER();
+
 	switch (sg->avail_state) {
 		case SG_AC_Idle:
 			set_scope_for_failover_node(sg, node);
@@ -2293,9 +2296,10 @@
 void amf_sg_failover_su_req (struct amf_sg *sg, struct amf_su *su, 
 	struct amf_node *node)
 {
-	ENTER ();
 	sg_event_t sg_event;
 
+	ENTER ();
+
 	switch (sg->avail_state) {
 		case SG_AC_Idle:
 			su->su_failover_cnt += 1;
@@ -2710,7 +2714,7 @@
  * @return struct amf_sg*
  */
 
-struct amf_sg *amf_sg_new (struct amf_application *app, char *name) 
+struct amf_sg *amf_sg_new (struct amf_application *app, const char *name) 
 {
 	struct amf_sg *sg = amf_calloc (1, sizeof (struct amf_sg));
 
@@ -2805,8 +2809,10 @@
 struct amf_sg *amf_sg_deserialize (struct amf_application *app, char *buf)
 {
 	char *tmp = buf;
-	struct amf_sg *sg = amf_sg_new (app, "");
+	struct amf_sg *sg;
 
+	sg = amf_sg_new (app, "");
+
 	tmp = amf_deserialize_SaNameT (tmp, &sg->name);
 	tmp = amf_deserialize_SaUint32T (tmp, &sg->saAmfSGRedundancyModel);
 	tmp = amf_deserialize_SaUint32T (tmp, &sg->saAmfSGAutoAdjust);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to