use defines for shift, instead of hard-coded number
authorAlan T. DeKok <aland@freeradius.org>
Tue, 20 Sep 2016 11:44:41 +0000 (07:44 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 20 Sep 2016 11:44:41 +0000 (07:44 -0400)
src/modules/rlm_eap/types/rlm_eap_fast/rlm_eap_fast.c

index be9c92f..9911ce4 100644 (file)
@@ -305,7 +305,7 @@ error:
        for (VALUE_PAIR *vp = fr_cursor_init(&cursor, &fast_vps); vp; vp = fr_cursor_next(&cursor)) {
                char *value;
 
-               switch (vp->da->attr >> 24) {
+               switch ((vp->da->attr >> fr_attr_shift[3]) & fr_attr_mask[3]) {
                case PAC_INFO_PAC_TYPE:
                        rad_assert(t->pac.type == 0);
                        t->pac.type = vp->vp_integer;