diff options
-rw-r--r-- | core/membuffer.c | 4 | ||||
-rw-r--r-- | core/membuffer.h | 4 | ||||
-rw-r--r-- | smtk-import/smartrak.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/membuffer.c b/core/membuffer.c index 46cb541f1..71832a428 100644 --- a/core/membuffer.c +++ b/core/membuffer.c @@ -278,7 +278,7 @@ void put_quoted(struct membuffer *b, const char *text, int is_attribute, int is_ } } -char *add_to_string_va(const char *old, const char *fmt, va_list args) +char *add_to_string_va(char *old, const char *fmt, va_list args) { char *res; struct membuffer o = { 0 }, n = { 0 }; @@ -296,7 +296,7 @@ char *add_to_string_va(const char *old, const char *fmt, va_list args) * WARNING - this will free(old), the intended pattern is * string = add_to_string(string, fmt, ...) */ -char *add_to_string(const char *old, const char *fmt, ...) +char *add_to_string(char *old, const char *fmt, ...) { char *res; va_list args; diff --git a/core/membuffer.h b/core/membuffer.h index cc441ba24..04f872010 100644 --- a/core/membuffer.h +++ b/core/membuffer.h @@ -71,8 +71,8 @@ extern __printf(2, 0) void put_vformat(struct membuffer *, const char *, va_list extern __printf(2, 0) void put_vformat_loc(struct membuffer *, const char *, va_list); extern __printf(2, 3) void put_format(struct membuffer *, const char *fmt, ...); extern __printf(2, 3) void put_format_loc(struct membuffer *, const char *fmt, ...); -extern __printf(2, 0) char *add_to_string_va(const char *old, const char *fmt, va_list args); -extern __printf(2, 3) char *add_to_string(const char *old, const char *fmt, ...); +extern __printf(2, 0) char *add_to_string_va(char *old, const char *fmt, va_list args); +extern __printf(2, 3) char *add_to_string(char *old, const char *fmt, ...); /* Helpers that use membuffers internally */ extern __printf(1, 0) char *vformat_string(const char *, va_list); diff --git a/smtk-import/smartrak.c b/smtk-import/smartrak.c index 63b3af799..8ef01de48 100644 --- a/smtk-import/smartrak.c +++ b/smtk-import/smartrak.c @@ -211,7 +211,7 @@ static MdbTableDef *smtk_open_table(MdbHandle *mdb, char *tablename, MdbColumn * This is based in add_to_string() and add_to_string_va(), and, as its parents * frees the original string. */ -static char *smtk_concat_str(const char *orig, const char *sep, const char *fmt, ...) +static char *smtk_concat_str(char *orig, const char *sep, const char *fmt, ...) { char *str; va_list args; @@ -229,7 +229,7 @@ static char *smtk_concat_str(const char *orig, const char *sep, const char *fmt, free_buffer(&out); free_buffer(&in); - free((void *)orig); + free(orig); return str; } |