if (argc >= 3) if (dict_process_flag_field(ctx, argv[2], &da) < 0) goto error;
#ifdef STATIC_ANALYZER
- if (!ctx->dict) goto fail;
+ if (!ctx->dict) goto error;
#endif
if (unlikely(dict_attr_parent_init(&da, parent) < 0)) goto error;
*/
#ifdef STATIC_ANALYZER
- if (!ctx->dict) goto fail;
+ if (!ctx->dict) goto error;
#endif
if (unlikely(dict_attr_parent_init(&da, parent) < 0)) goto error;
if (dict_attr_add_to_namespace(da->parent, da) < 0) return -1;
#ifndef NDEBUG
- /*
- * Check if we added the attribute
- */
- da = dict_attr_child_by_num(da->parent, da->attr);
- if (!da) {
- fr_strerror_printf("FATAL - Failed to find attribute number %u we just added to parent '%s'", da->attr, da->parent->name);
- return -1;
- }
+ {
+ fr_dict_attr_t const *found;
- if (!dict_attr_by_name(NULL, da->parent, da->name)) {
- fr_strerror_printf("FATAL - Failed to find attribute '%s' we just added to parent '%s'", da->name, da->parent->name);
- return -1;
+ /*
+ * Check if we added the attribute
+ */
+ found = dict_attr_child_by_num(da->parent, da->attr);
+ if (!found) {
+ fr_strerror_printf("FATAL - Failed to find attribute number %u we just added to parent '%s'", da->attr, da->parent->name);
+ return -1;
+ }
+
+ if (!dict_attr_by_name(NULL, da->parent, da->name)) {
+ fr_strerror_printf("FATAL - Failed to find attribute '%s' we just added to parent '%s'", da->name, da->parent->name);
+ return -1;
+ }
}
#endif