X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=quote.c;h=aa440098e1d8a771aa2d9d2e17355fd560f3c253;hb=2abd31b07864049f0352d86c0c90413123f40945;hp=fb9e4ca253ea9bcadbcb55dcdd62be614c66758f;hpb=bff898b894815ad291b35d213f1c022d1d16a9b9;p=git.git diff --git a/quote.c b/quote.c index fb9e4ca25..aa440098e 100644 --- a/quote.c +++ b/quote.c @@ -20,7 +20,7 @@ static inline int need_bs_quote(char c) return (c == '\'' || c == '!'); } -size_t sq_quote_buf(char *dst, size_t n, const char *src) +static size_t sq_quote_buf(char *dst, size_t n, const char *src) { char c; char *bp = dst; @@ -62,18 +62,6 @@ void sq_quote_print(FILE *stream, const char *src) fputc('\'', stream); } -char *sq_quote(const char *src) -{ - char *buf; - size_t cnt; - - cnt = sq_quote_buf(NULL, 0, src) + 1; - buf = xmalloc(cnt); - sq_quote_buf(buf, cnt, src); - - return buf; -} - char *sq_quote_argv(const char** argv, int count) { char *buf, *to;