aboutsummaryrefslogtreecommitdiff
path: root/src/core/url.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-18 20:24:16 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-18 20:24:16 -0800
commit600f81148be4d08b6b1c308165b3eff1c30ac216 (patch)
treed17ca1570a484182d333df2f1060137c6fdc4134 /src/core/url.c
parent143b6322f8217cfdbef8f3171d55d10348d1be37 (diff)
downloadnng-600f81148be4d08b6b1c308165b3eff1c30ac216.tar.gz
nng-600f81148be4d08b6b1c308165b3eff1c30ac216.tar.bz2
nng-600f81148be4d08b6b1c308165b3eff1c30ac216.zip
url: Use NNG_EINVAL for parse failures
Diffstat (limited to 'src/core/url.c')
-rw-r--r--src/core/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/url.c b/src/core/url.c
index 4be730cc..74346437 100644
--- a/src/core/url.c
+++ b/src/core/url.c
@@ -434,7 +434,7 @@ nng_url_parse(nng_url **urlp, const char *raw)
// make sure only one '@' appears in the host (only one user
// info is allowed)
if (strchr(url->u_hostname, '@') != NULL) {
- rv = NNG_EADDRINVAL;
+ rv = NNG_EINVAL;
goto error;
}
}
@@ -500,7 +500,7 @@ nng_url_parse(nng_url **urlp, const char *raw)
}
// hostname length check
if (strlen(url->u_hostname) >= 256) {
- rv = NNG_EADDRINVAL;
+ rv = NNG_EINVAL;
goto error;
}