|
@@ -98,16 +98,6 @@ typedef struct str_map
|
|
|
|
|
|
extern str_map_t algo_names[];
|
|
|
|
|
|
-static inline int str_cmp(const str *a, const str *b)
|
|
|
-{
|
|
|
- return !(a->len == b->len && !strncmp(a->s, b->s, a->len));
|
|
|
-}
|
|
|
-
|
|
|
-static inline int str_i_cmp(const str *a, const str *b)
|
|
|
-{
|
|
|
- return !(a->len == b->len && !strncasecmp(a->s, b->s, a->len));
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* converts a mapped str to an int
|
|
|
* \return 0 if found, -1 otherwise
|
|
@@ -115,7 +105,7 @@ static inline int str_i_cmp(const str *a, const str *b)
|
|
|
static inline int str_map_str(const str_map_t *map, const str *key, int *ret)
|
|
|
{
|
|
|
for(; map->str.s; map++)
|
|
|
- if(!str_i_cmp(&map->str, key)) {
|
|
|
+ if(!str_strcasecmp(&map->str, key)) {
|
|
|
*ret = map->id;
|
|
|
return 0;
|
|
|
}
|