From 05551ca091bed2aa1f557b848c7602d036961bd3 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sat, 3 Mar 2018 20:14:54 +0000 Subject: Remove now unnecessary `gitno_unescape` --- src/netops.c | 18 ------------------ src/netops.h | 2 -- 2 files changed, 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 -- cgit v1.2.1