Skip to content

Commit

Permalink
Revert "Tighten scope on addr"
Browse files Browse the repository at this point in the history
This reverts commit 3523ad7.

just leave it hoisted to the top of the function, where it causes
the least amount of problems.
  • Loading branch information
alandekok committed Dec 8, 2023
1 parent a4300f9 commit 7f6d1a1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/util/value.c
Original file line number Diff line number Diff line change
Expand Up @@ -4671,6 +4671,7 @@ ssize_t fr_value_box_from_substr(TALLOC_CTX *ctx, fr_value_box_t *dst,
static fr_sbuff_parse_rules_t default_rules;
fr_sbuff_t *unescaped = NULL;
fr_sbuff_t our_in = FR_SBUFF(in);
fr_ipaddr_t addr;
fr_slen_t slen;
char buffer[256];

Expand Down Expand Up @@ -4843,9 +4844,6 @@ ssize_t fr_value_box_from_substr(TALLOC_CTX *ctx, fr_value_box_t *dst,
FR_SBUFF_SET_RETURN(in, &our_in);
}

{
fr_ipaddr_t addr;

case FR_TYPE_IPV4_ADDR:
{
size_t name_len = fr_sbuff_adv_past_allowed(&our_in, fr_sbuff_remaining(&our_in), sbuff_char_class_hostname, rules->terminals);
Expand Down Expand Up @@ -4955,7 +4953,6 @@ ssize_t fr_value_box_from_substr(TALLOC_CTX *ctx, fr_value_box_t *dst,
fr_hostname_lookups, true) < 0) return -1;
}
goto finish;
}

case FR_TYPE_UINT8:
case FR_TYPE_UINT16:
Expand Down

0 comments on commit 7f6d1a1

Please sign in to comment.