diff options
author | Björn Jacke <bj@sernet.de> | 2016-12-08 17:53:43 +0100 |
---|---|---|
committer | Bjoern Jacke <bj@sernet.de> | 2016-12-09 20:45:15 +0100 |
commit | 44a01a2d3d15923e14516d5a9ffd195e6fe41e8b (patch) | |
tree | fb7d6bad228280b31fa7c7c2d3ffb38ace482e52 /lib | |
parent | bfc6adfb20d208e994f1b203237dca320b9901d4 (diff) | |
download | samba-44a01a2d3d15923e14516d5a9ffd195e6fe41e8b.tar.gz |
util: use SCOPE_DELIMITER for the IPv6 scope delimiter
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Dec 9 20:45:15 CET 2016 on sn-devel-144
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/util_net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/util/util_net.c b/lib/util/util_net.c index cb238adcf5d..cbc836cc54c 100644 --- a/lib/util/util_net.c +++ b/lib/util/util_net.c @@ -86,7 +86,7 @@ static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len) cnt_delimiter += 1; break; case 's': - buf[i] = '%'; + buf[i] = SCOPE_DELIMITER; idx_chars += 1; break; case '0': @@ -131,7 +131,7 @@ static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len) for (; idx_chars != 0 && i < len; i++) { switch (str[i]) { - case '%': + case SCOPE_DELIMITER: case ':': return NULL; default: @@ -185,7 +185,7 @@ bool interpret_string_addr_internal(struct addrinfo **ppres, } if (strchr_m(str, ':')) { - char *p = strchr_m(str, '%'); + char *p = strchr_m(str, SCOPE_DELIMITER); /* * Cope with link-local. @@ -502,7 +502,7 @@ bool is_ipaddress_v6(const char *str) unsigned int idx = 0; struct in6_addr ip6; - p = strchr_m(str, '%'); + p = strchr_m(str, SCOPE_DELIMITER); if (p && (p > str)) { len = PTR_DIFF(p, str); idxs = p + 1; |