summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-03-03 20:14:54 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-03-19 16:08:01 -0700
commit05551ca091bed2aa1f557b848c7602d036961bd3 (patch)
tree7f2c9e9a0f1423e91e351764ec44a3128b6192c1
parent60e7848e1e3cb3a1a3e4f3aa08d353bab90d47c0 (diff)
downloadlibgit2-05551ca091bed2aa1f557b848c7602d036961bd3.tar.gz
Remove now unnecessary `gitno_unescape`
-rw-r--r--src/netops.c18
-rw-r--r--src/netops.h2
2 files changed, 0 insertions, 20 deletions
diff --git a/src/netops.c b/src/netops.c
index 26cb6079d..c74faffb8 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -206,24 +206,6 @@ void gitno_connection_data_free_ptrs(gitno_connection_data *d)
git__free(d->pass); d->pass = NULL;
}
-#define hex2c(c) ((c | 32) % 39 - 9)
-char* gitno_unescape(char *str)
-{
- int x, y;
- int len = (int)strlen(str);
-
- for (x=y=0; str[y]; ++x, ++y) {
- if ((str[x] = str[y]) == '%') {
- if (y < len-2 && isxdigit(str[y+1]) && isxdigit(str[y+2])) {
- str[x] = (hex2c(str[y+1]) << 4) + hex2c(str[y+2]);
- y += 2;
- }
- }
- }
- str[x] = '\0';
- return str;
-}
-
int gitno_extract_url_parts(
char **host_out,
char **port_out,
diff --git a/src/netops.h b/src/netops.h
index ed1cc865a..75fd9a512 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -96,6 +96,4 @@ int gitno_extract_url_parts(
const char *url,
const char *default_port);
-char* gitno_unescape(char *str);
-
#endif