]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more build fixes
authorAlan T. DeKok <aland@freeradius.org>
Wed, 7 Aug 2019 19:36:40 +0000 (15:36 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 7 Aug 2019 19:36:40 +0000 (15:36 -0400)
src/lib/util/dict.c

index 48c9a066817bace9a2cc4030946ff48bd1203d74..936d7fa632a6ae6a08051b6d82ce6bf7bb35d19f 100644 (file)
@@ -441,6 +441,9 @@ static int dict_enum_value_cmp(void const *one, void const *two)
 }
 
 
+static bool dict_attr_flags_valid(fr_dict_t *dict, fr_dict_attr_t const *parent,
+                                 UNUSED char const *name, int *attr, fr_type_t type, fr_dict_attr_flags_t *flags) CC_HINT(nonnull(1,2,6));
+
 /** Validate a set of flags
  *
  * @param[in] dict             of protocol context we're operating in.
@@ -818,16 +821,15 @@ static bool dict_attr_flags_valid(fr_dict_t *dict, fr_dict_attr_t const *parent,
                 *      Set the length / type_size of vendor
                 *      attributes from the vendor definition.
                 */
-               {
+               flags->type_size = 1;
+               flags->length = 1;
+               if (attr) {
                        fr_dict_vendor_t const *dv;
 
                        dv = fr_dict_vendor_by_num(dict, *attr);
                        if (dv) {
                                flags->type_size = dv->type;
                                flags->length = dv->length;
-                       } else {
-                               flags->type_size = 1;
-                               flags->length = 1;
                        }
                }
                break;