]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove unnecessary variable
authorAlan T. DeKok <aland@freeradius.org>
Sat, 24 Mar 2018 17:46:23 +0000 (13:46 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 24 Mar 2018 17:50:40 +0000 (13:50 -0400)
src/modules/rlm_files/rlm_files.c

index ef067a71fca80f57c481782e1f15afb145d51f6b..66dd1e23ab4f547c5f16a8db58eed7840e55f1ca 100644 (file)
@@ -298,7 +298,7 @@ static int mod_instantiate(void *instance, UNUSED CONF_SECTION *conf)
 static rlm_rcode_t file_common(rlm_files_t const *inst, REQUEST *request, char const *filename, rbtree_t *tree,
                               RADIUS_PACKET *request_packet, RADIUS_PACKET *reply_packet)
 {
-       char const      *name, *match;
+       char const      *name;
        VALUE_PAIR      *check_tmp;
        VALUE_PAIR      *reply_tmp;
        PAIR_LIST const *user_pl, *default_pl;
@@ -343,22 +343,18 @@ static rlm_rcode_t file_common(rlm_files_t const *inst, REQUEST *request, char c
 
                if (!default_pl && user_pl) {
                        pl = user_pl;
-                       match = name;
                        user_pl = user_pl->next;
 
                } else if (!user_pl && default_pl) {
                        pl = default_pl;
-                       match = "DEFAULT";
                        default_pl = default_pl->next;
 
                } else if (user_pl->lineno < default_pl->lineno) {
                        pl = user_pl;
-                       match = name;
                        user_pl = user_pl->next;
 
                } else {
                        pl = default_pl;
-                       match = "DEFAULT";
                        default_pl = default_pl->next;
                }
 
@@ -374,7 +370,7 @@ static rlm_rcode_t file_common(rlm_files_t const *inst, REQUEST *request, char c
                }
 
                if (paircompare(request, request_packet->vps, check_tmp, &reply_packet->vps) == 0) {
-                       RDEBUG2("Found match \"%s\" one line %d of %s", match, pl->lineno, filename);
+                       RDEBUG2("Found match \"%s\" one line %d of %s", pl->name, pl->lineno, filename);
                        found = true;
 
                        /* ctx may be reply or proxy */