summaryrefslogtreecommitdiff
path: root/src/net.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-12-01 10:06:11 +1100
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 09:54:29 -0600
commit297c61e41f23caacb39d8c00957fd5ec050c9cbf (patch)
treedddef32bc863764eebb183da2319fe0a10678b73 /src/net.c
parenta194e17f9793eb960745243dde3eabfd60b65b56 (diff)
downloadlibgit2-297c61e41f23caacb39d8c00957fd5ec050c9cbf.tar.gz
net: add an isvalid function
(Also, mark all the declarations as extern.)
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.c b/src/net.c
index a1dc408e0..24b85c0b5 100644
--- a/src/net.c
+++ b/src/net.c
@@ -153,6 +153,11 @@ done:
return error;
}
+bool git_net_url_valid(git_net_url *url)
+{
+ return (url->host && url->port && url->path);
+}
+
int git_net_url_is_default_port(git_net_url *url)
{
return (strcmp(url->port, default_port_for_scheme(url->scheme)) == 0);