Skip to content

Commit

Permalink
Remove unused flags
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Nov 16, 2015
1 parent b548cb3 commit 84b0252
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/include/dict.h
Expand Up @@ -27,15 +27,13 @@
typedef struct attr_flags {
unsigned int is_root : 1; //!< Is root of a dictionary.
unsigned int is_unknown : 1; //!< Attribute number or vendor is unknown.
unsigned int is_tlv : 1; //!< Is a sub attribute.

unsigned int internal : 1; //!< Internal attribute, should not be received
//!< in protocol packets, should not be encoded.
unsigned int has_tag : 1; //!< Tagged attribute.
unsigned int array : 1; //!< Pack multiples into 1 attr.
unsigned int has_value : 1; //!< Has a value.
unsigned int has_value_alias : 1; //!< Has a value alias.
unsigned int has_tlv : 1; //!< Has sub attributes.

unsigned int extended : 1; //!< Extended attribute.
unsigned int long_extended : 1; //!< Long format.
Expand Down
4 changes: 1 addition & 3 deletions src/lib/dict.c
Expand Up @@ -460,13 +460,11 @@ do { \

FLAG_SET(is_root);
FLAG_SET(is_unknown);
FLAG_SET(is_tlv);
FLAG_SET(internal);
FLAG_SET(has_tag);
FLAG_SET(array);
FLAG_SET(has_value);
FLAG_SET(has_value_alias);
FLAG_SET(has_tlv);
FLAG_SET(extended);
FLAG_SET(long_extended);
FLAG_SET(evs);
Expand Down Expand Up @@ -1344,7 +1342,7 @@ int fr_dict_attr_add(fr_dict_attr_t const *parent, char const *name, unsigned in
* field.
*/
vendor_max = ((uint64_t)1 << (dv->type << 3)) - 1;
if (((unsigned int)attr > vendor_max) && !flags.is_tlv && !flags.internal) {
if (((unsigned int)attr > vendor_max) && !flags.internal) {
fr_strerror_printf("ATTRIBUTE has invalid number %i (larger than vendor max %u)",
attr, vendor_max);
goto error;
Expand Down

0 comments on commit 84b0252

Please sign in to comment.