]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
one more 'const'
authorAlan T. DeKok <aland@freeradius.org>
Mon, 30 Jan 2017 17:42:19 +0000 (12:42 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 30 Jan 2017 17:42:19 +0000 (12:42 -0500)
src/lib/radius_decode.c

index 5c16df87befd11778f86db84f7e694cbe7d292e2..400c8da61f348c91b1bcc72f6473798b35762bfb 100644 (file)
@@ -392,7 +392,7 @@ ssize_t fr_radius_decode_tlv(TALLOC_CTX *ctx, vp_cursor_t *cursor,
 
                child = fr_dict_attr_child_by_num(parent, p[0]);
                if (!child) {
-                       fr_dict_attr_t *unknown_child;
+                       fr_dict_attr_t const *unknown_child;
 
                        FR_PROTO_TRACE("Failed to find child %u of TLV %s", p[0], parent->name);
 
@@ -1145,11 +1145,9 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dic
 
                child = fr_dict_attr_child_by_num(parent, p[0]);
                if (!child) {
-                       fr_dict_attr_t *new;
-
                        if ((p[0] != PW_VENDOR_SPECIFIC) || (data_len < (3 + 4 + 1))) {
                                /* da->attr < 255, da->vendor == 0 */
-                               new = fr_dict_unknown_afrom_fields(ctx, parent, 0, p[0]);
+                               child = fr_dict_unknown_afrom_fields(ctx, parent, 0, p[0]);
                        } else {
                                /*
                                 *      Try to find the VSA.
@@ -1159,10 +1157,8 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, vp_cursor_t *cursor, fr_dic
 
                                if (vendor == 0) goto raw;
 
-                               new = fr_dict_unknown_afrom_fields(ctx, parent, vendor, p[7]);
+                               child = fr_dict_unknown_afrom_fields(ctx, parent, vendor, p[7]);
                        }
-                       child = new;
-
                        if (!child) {
                                fr_strerror_printf("%s: Internal sanity check %d", __FUNCTION__, __LINE__);
                                return -1;