BuildSystem: Remove unused variables.
[asterisk/asterisk.git] / main / named_acl.c
index 393532a..3a4c454 100644 (file)
@@ -105,19 +105,8 @@ struct named_acl {
        char name[ACL_NAME_LENGTH]; /* Same max length as a configuration category */
 };
 
-static int named_acl_hash_fn(const void *obj, const int flags)
-{
-       const struct named_acl *entry = obj;
-       return ast_str_hash(entry->name);
-}
-
-static int named_acl_cmp_fn(void *obj, void *arg, const int flags)
-{
-       struct named_acl *entry1 = obj;
-       struct named_acl *entry2 = arg;
-
-       return (!strcmp(entry1->name, entry2->name)) ? (CMP_MATCH | CMP_STOP) : 0;
-}
+AO2_STRING_FIELD_HASH_FN(named_acl, name)
+AO2_STRING_FIELD_CMP_FN(named_acl, name)
 
 /*! \brief destructor for named_acl_config */
 static void named_acl_config_destructor(void *obj)
@@ -401,7 +390,7 @@ static int publish_acl_change(const char *name)
        return 0;
 
 publish_failure:
-       ast_log(LOG_ERROR, "Failed to to issue ACL change message for %s.\n",
+       ast_log(LOG_ERROR, "Failed to issue ACL change message for %s.\n",
                ast_strlen_zero(name) ? "all named ACLs" : name);
        return -1;
 }