Moved the SaNameTisNNameT function to util.c and called it name_match.

(Logical change 1.84)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@309 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Mark Haverkamp 2004-09-28 18:29:14 +00:00
parent 2f5f081798
commit a823dba831
2 changed files with 2 additions and 12 deletions

View File

@ -41,6 +41,7 @@
#include "../include/ais_types.h"
#include "../include/list.h"
#include "util.h"
#include "parse.h"
#include "mempool.h"
@ -73,15 +74,6 @@ int SaNameTisEqual (SaNameT *str1, char *str2) {
}
}
int SaNameTisNameT (SaNameT *name1, SaNameT *name2) {
if (name1->length == name2->length) {
return ((strncmp ((char *)name1->value, (char *)name2->value,
name1->length)) == 0);
} else {
return 0;
}
}
struct saAmfComponent *findComponent (SaNameT *name)
{
struct list_head *AmfGroupList = 0;
@ -123,7 +115,7 @@ struct saAmfComponent *findComponent (SaNameT *name)
AmfComponent = list_entry (AmfComponentList,
struct saAmfComponent, saAmfComponentList);
if (SaNameTisNameT (name, &AmfComponent->name)) {
if (name_match (name, &AmfComponent->name)) {
found = 1;
}
}

View File

@ -153,8 +153,6 @@ extern struct list_head saAmfGroupHead;
extern struct saAmfComponent *findComponent (SaNameT *name);
extern int SaNameTisNameT (SaNameT *name1, SaNameT *name2);
extern int amfReadGroups (char **error_string);
extern int readNetwork (char **error_string,