]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Failure to set shortname is the error
authorNick Porter <nick@portercomputing.co.uk>
Wed, 21 Jan 2026 10:43:04 +0000 (10:43 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 21 Jan 2026 10:48:29 +0000 (10:48 +0000)
src/protocols/der/base.c

index 555942d83ddecb1d0d1192ce924cd22a6f986879..5383371534c07200273a92d3612632f1f6e04e75 100644 (file)
@@ -474,7 +474,7 @@ static int dict_flag_shortname(fr_dict_attr_t **da_p, char const *value, UNUSED
         *      when we clone the attribute, we can just copy the pointer.
         */
        flags->shortname = talloc_strdup(fr_dict_unconst((*da_p)->dict), value);
-       if (flags->shortname) return -1;
+       if (!flags->shortname) return -1;
 
        flags->has_shortname = true;
 
@@ -1077,7 +1077,7 @@ static bool attr_valid(fr_dict_attr_t *da)
        if ((da->type == FR_TYPE_GROUP) && !da->flags.allow_flat) {
                if ((da->parent == attr_oid_tree) || da->parent->flags.allow_flat) {
                        da->flags.allow_flat = true;
-               } else {                        
+               } else {
                        fr_dict_attr_t const *oid;
 
                        for (oid = da->parent; !oid->flags.is_root; oid = oid->parent) {