From 55cd3891797573e07daba831514c73f94a5831ac Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Wed, 14 Jan 2009 09:53:10 +0100 Subject: Add two sprintf like functions to str.c, fix a bug Bug in str__destroy() caused us to try to free a NULL pointer. --- str.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'str.h') diff --git a/str.h b/str.h index e3ff17a..c912fa8 100644 --- a/str.h +++ b/str.h @@ -48,6 +48,8 @@ isc_result_t str_clone(ld_string_t **dest, const ld_string_t *src _STR_MEM_FLARG isc_result_t str_init_char(ld_string_t *dest, const char *src); isc_result_t str_cat_char(ld_string_t *dest, const char *src); isc_result_t str_cat(ld_string_t *dest, const ld_string_t *src); +isc_result_t str_sprintf(ld_string_t *dest, const char *format, ...); +isc_result_t str_vsprintf(ld_string_t *dest, const char *format, va_list ap); /* These are pseudo-private functions and shouldn't be called directly. */ isc_result_t str__new(isc_mem_t *mctx, ld_string_t **new_str _STR_MEM_FLARG); -- cgit