Skip to content

Commit

Permalink
uri: remove ipv6 ifdef checks
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianfridrich committed Mar 23, 2023
1 parent ffa8a9c commit a987356
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/uri/uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ int uri_encode(struct re_printf *pf, const struct uri *uri)
/* The IPv6 address is delimited by '[' and ']' */
switch (uri->af) {

#ifdef HAVE_INET6
case AF_INET6:
err = re_hprintf(pf, "[%r]", &uri->host);
break;
#endif

default:
err = re_hprintf(pf, "%r", &uri->host);
Expand Down Expand Up @@ -331,11 +329,9 @@ int uri_escape_pl(struct re_printf *pf, const struct pl *pl)
/* The IPv6 address is delimited by '[' and ']' */
switch (uri.af) {

#ifdef HAVE_INET6
case AF_INET6:
err = re_hprintf(pf, "[%r]", &uri.host);
break;
#endif

default:
err = re_hprintf(pf, "%r", &uri.host);
Expand Down

0 comments on commit a987356

Please sign in to comment.