diff options
Diffstat (limited to 'src/daemon/https/tls/gnutls_str.c')
-rw-r--r-- | src/daemon/https/tls/gnutls_str.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/daemon/https/tls/gnutls_str.c b/src/daemon/https/tls/gnutls_str.c index 4bd09b96..38f04738 100644 --- a/src/daemon/https/tls/gnutls_str.c +++ b/src/daemon/https/tls/gnutls_str.c | |||
@@ -227,33 +227,6 @@ mhd_gtls_string_append_data (mhd_gtls_string * dest, | |||
227 | } | 227 | } |
228 | } | 228 | } |
229 | 229 | ||
230 | int | ||
231 | mhd_gtls_string_append_printf (mhd_gtls_string * dest, const char *fmt, ...) | ||
232 | { | ||
233 | va_list args; | ||
234 | int len; | ||
235 | char *str; | ||
236 | |||
237 | va_start (args, fmt); | ||
238 | len = vsnprintf (NULL, 0, fmt, args); | ||
239 | va_end (args); | ||
240 | if (len < 0) | ||
241 | return -1; | ||
242 | str = malloc(len + 1); | ||
243 | if (! str) | ||
244 | return -1; | ||
245 | |||
246 | va_start (args, fmt); | ||
247 | len = vsprintf (str, fmt, args); | ||
248 | va_end (args); | ||
249 | |||
250 | len = mhd_gtls_string_append_str (dest, str); | ||
251 | |||
252 | free (str); | ||
253 | |||
254 | return len; | ||
255 | } | ||
256 | |||
257 | /* Converts the given string (old) to hex. A buffer must be provided | 230 | /* Converts the given string (old) to hex. A buffer must be provided |
258 | * to hold the new hex string. The new string will be null terminated. | 231 | * to hold the new hex string. The new string will be null terminated. |
259 | * If the buffer does not have enough space to hold the string, a | 232 | * If the buffer does not have enough space to hold the string, a |