Skip to content

Commit

Permalink
lib: Mark str_append_n() deprecated
Browse files Browse the repository at this point in the history
It was almost always used wrongly. Most of the time str_append_data()
should have been used instead. str_append_max() has the old functionality.
  • Loading branch information
sirainen committed Aug 30, 2018
1 parent 847a4fe commit 0663cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/str.h
Expand Up @@ -29,7 +29,7 @@ static inline size_t str_len(const string_t *str)
/* Append NUL-terminated string. If the trailing NUL isn't found earlier,
append a maximum of max_len characters. */
void str_append_max(string_t *str, const char *cstr, size_t max_len);
static inline void
static inline void ATTR_DEPRECATED("Use str_append_max() or str_append_data() instead")
str_append_n(string_t *str, const void *cstr, size_t max_len)
{
str_append_max(str, cstr, max_len);
Expand Down

0 comments on commit 0663cd5

Please sign in to comment.