From a823dba8314c77c3bd9f2d29c2d8d70cef2bb674 Mon Sep 17 00:00:00 2001 From: Mark Haverkamp Date: Tue, 28 Sep 2004 18:29:14 +0000 Subject: [PATCH] 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 --- exec/parse.c | 12 ++---------- exec/parse.h | 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/exec/parse.c b/exec/parse.c index 355ae32b..91f37c1b 100644 --- a/exec/parse.c +++ b/exec/parse.c @@ -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; } } diff --git a/exec/parse.h b/exec/parse.h index 37f982ec..b86aeba6 100644 --- a/exec/parse.h +++ b/exec/parse.h @@ -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,