aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/tls_test_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/tls_test_common.c')
-rw-r--r--src/testcurl/https/tls_test_common.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c
index 639bccf1..f27813a2 100644
--- a/src/testcurl/https/tls_test_common.c
+++ b/src/testcurl/https/tls_test_common.c
@@ -320,15 +320,18 @@ gen_test_file_url (char *url,
320 size_t url_len, 320 size_t url_len,
321 uint16_t port) 321 uint16_t port)
322{ 322{
323 unsigned int ret = 0; 323 int res;
324 /* construct url */
325 if ((size_t) snprintf (url,
326 url_len,
327 "https://127.0.0.1:%u/urlpath",
328 (unsigned int) port) >= url_len)
329 ret = 1;
330 324
331 return ret; 325 res = snprintf (url,
326 url_len,
327 "https://127.0.0.1:%u/urlpath",
328 (unsigned int) port);
329 if (res <= 0)
330 return 1;
331 if ((size_t) res >= url_len)
332 return 1;
333
334 return 0;
332} 335}
333 336
334 337