diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-25 20:52:00 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2019-03-27 13:58:15 +0100 |
commit | 643a964d099b2bac29500dcd70aaec3ee3e9b0bd (patch) | |
tree | b57893ddf656996b20bcbd1ff89ebaf12c75180a /core/membuffer.h | |
parent | 40a3e562b01de2827fa6c2c5fd9d46631f91dc36 (diff) | |
download | subsurface-643a964d099b2bac29500dcd70aaec3ee3e9b0bd.tar.gz |
Cleanup: unconstify string argument to add_to_string()
add_to_string() frees the original string that is passed in. This
should therefore not be of "const char *" type, as the contents
of the string *will* be modified (or more precisely: destroyed).
Same for the congener smtk_concat_str().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/membuffer.h')
-rw-r--r-- | core/membuffer.h | 4 |
1 files changed, 2 insertions, 2 deletions
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); |