X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fcm_hash.c;h=5793bc3f8fa6abe833b1090fae6eda3029bb7842;hb=65443172dd60a6ea312bd3a15959dbf54ad7f045;hp=e2b7cc6e3bbddaf7041e8519eb0c8d2f192bd479;hpb=def50dc175cebc67238db5f1acd5ff322a2279bd;p=o-du%2Fl2.git diff --git a/src/cm/cm_hash.c b/src/cm/cm_hash.c index e2b7cc6e3..5793bc3f8 100644 --- a/src/cm/cm_hash.c +++ b/src/cm/cm_hash.c @@ -110,34 +110,34 @@ extern "C" { #endif -PRIVATE S16 cmHashFuncBCD8 ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncBCD8 ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncConId ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncConId ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncUInt32Mod ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncU32Mod ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncString ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncString ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncDefault ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncDefault ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncAnyKey ARGS((CmHashListCp *hashListCp, uint8_t *key, +static S16 cmHashFuncAnyKey ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashMatchKey ARGS((uint8_t *key1, uint16_t keyLen1, uint8_t *key2, uint16_t keyLen2)); +static S16 cmHashMatchKey ARGS((uint8_t *key1, uint16_t keyLen1, uint8_t *key2, uint16_t keyLen2)); -PRIVATE S16 cmListInsert ARGS((CmListEnt *oldEntry, CmListEnt *newEntry)); +static S16 cmListInsert ARGS((CmListEnt *oldEntry, CmListEnt *newEntry)); -PRIVATE S16 cmListDelete ARGS((CmListEnt *entry)); +static S16 cmListDelete ARGS((CmListEnt *entry)); /* cm_hash_c_001.main_22: Fixing warnings on GCC compiler */ -PRIVATE S16 cmHashFuncMult24 ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); +static S16 cmHashFuncMult24 ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); -PRIVATE S16 cmHashFuncDirIdx ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); +static S16 cmHashFuncDirIdx ARGS((CmHashListCp *hashListCp, uint8_t *key, uint16_t keyLen, uint16_t *idx)); #ifdef __cplusplus } @@ -172,7 +172,7 @@ PRIVATE S16 cmHashFuncDirIdx ARGS((CmHashListCp *hashListCp, uint8_t *key, uint1 */ #ifdef ANSI -PRIVATE S16 cmHashFuncAnyKey +static S16 cmHashFuncAnyKey ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -180,7 +180,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* idx to return */ ) #else -PRIVATE S16 cmHashFuncAnyKey (hashListCp, key, keyLen, idx) +static S16 cmHashFuncAnyKey (hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -242,7 +242,7 @@ uint16_t *idx; /* idx to return */ /* * -* Fun: cmHashFuncUInt32Mod +* Fun: cmHashFuncU32Mod * * Desc: Computes the hash list index (bin number) for a specified * key of type CM_HASH_KEYTYPE_MOD. @@ -258,7 +258,7 @@ uint16_t *idx; /* idx to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncUInt32Mod +static S16 cmHashFuncU32Mod ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -266,7 +266,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* idx to return */ ) #else -PRIVATE S16 cmHashFuncUInt32Mod (hashListCp, key, keyLen, idx) +static S16 cmHashFuncU32Mod (hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -290,7 +290,7 @@ uint16_t *idx; /* idx to return */ return ROK; -} /* end of cmHashFuncUInt32Mod () */ +} /* end of cmHashFuncU32Mod () */ /* * @@ -318,7 +318,7 @@ uint16_t *idx; /* idx to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncBCD8 +static S16 cmHashFuncBCD8 ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -326,7 +326,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* idx to return */ ) #else -PRIVATE S16 cmHashFuncBCD8 (hashListCp, key, keyLen, idx) +static S16 cmHashFuncBCD8 (hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -392,7 +392,7 @@ uint16_t *idx; /* idx to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncString +static S16 cmHashFuncString ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -400,7 +400,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* idx to return */ ) #else -PRIVATE S16 cmHashFuncString (hashListCp, key, keyLen, idx) +static S16 cmHashFuncString (hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -449,7 +449,7 @@ uint16_t *idx; /* idx to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncDefault +static S16 cmHashFuncDefault ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -457,7 +457,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* index to return */ ) #else -PRIVATE S16 cmHashFuncDefault(hashListCp, key, keyLen, idx) +static S16 cmHashFuncDefault(hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -517,7 +517,7 @@ uint16_t *idx; /* index to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncMult24 +static S16 cmHashFuncMult24 ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -525,7 +525,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* index to return */ ) #else -PRIVATE S16 cmHashFuncMult24(hashListCp, key, keyLen, idx) +static S16 cmHashFuncMult24(hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -579,7 +579,7 @@ uint16_t *idx; /* index to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncConId +static S16 cmHashFuncConId ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -587,7 +587,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* index to return */ ) #else -PRIVATE S16 cmHashFuncConId(hashListCp, key, keyLen, idx) +static S16 cmHashFuncConId(hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -647,7 +647,7 @@ uint16_t *idx; /* index to return */ */ #ifdef ANSI -PRIVATE S16 cmHashFuncDirIdx +static S16 cmHashFuncDirIdx ( CmHashListCp *hashListCp, /* hash list control point */ uint8_t *key, /* key string */ @@ -655,7 +655,7 @@ uint16_t keyLen, /* length of key string */ uint16_t *idx /* index to return */ ) #else -PRIVATE S16 cmHashFuncDirIdx(hashListCp, key, keyLen, idx) +static S16 cmHashFuncDirIdx(hashListCp, key, keyLen, idx) CmHashListCp *hashListCp; /* hash list control point */ uint8_t *key; /* key string */ uint16_t keyLen; /* length of key string */ @@ -688,7 +688,7 @@ uint16_t *idx; /* index to return */ */ #ifdef ANSI -PRIVATE S16 cmHashMatchKey +static S16 cmHashMatchKey ( uint8_t *key1, /* first key string */ uint16_t keyLen1, /* length of first key string */ @@ -696,7 +696,7 @@ uint8_t *key2, /* second key string */ uint16_t keyLen2 /* length of second key string */ ) #else -PRIVATE S16 cmHashMatchKey(key1, keyLen1, key2, keyLen2) +static S16 cmHashMatchKey(key1, keyLen1, key2, keyLen2) uint8_t *key1; /* first key string */ uint16_t keyLen1; /* length of first key string */ uint8_t *key2; /* second key string */ @@ -728,13 +728,13 @@ uint16_t keyLen2; /* length of second key string */ */ #ifdef ANSI -PRIVATE S16 cmListInsert +static S16 cmListInsert ( CmListEnt *oldEntry, /* add new entry after this entry */ CmListEnt *newEntry /* new entry to add */ ) #else -PRIVATE S16 cmListInsert(oldEntry, newEntry) +static S16 cmListInsert(oldEntry, newEntry) CmListEnt *oldEntry; /* add new entry after this entry */ CmListEnt *newEntry; /* new entry to add */ #endif @@ -764,12 +764,12 @@ CmListEnt *newEntry; /* new entry to add */ */ #ifdef ANSI -PRIVATE S16 cmListDelete +static S16 cmListDelete ( CmListEnt *entry /* entry to delete */ ) #else -PRIVATE S16 cmListDelete(entry) +static S16 cmListDelete(entry) CmListEnt *entry; /* entry to delete */ #endif { @@ -895,7 +895,7 @@ Pool pool; /* memory pool to allocate bins */ break; case CM_HASH_KEYTYPE_UINT32_MOD: - hashListCp->hashFunc = cmHashFuncUInt32Mod; + hashListCp->hashFunc = cmHashFuncU32Mod; break; case CM_HASH_KEYTYPE_BCD8: