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 Apr 23, 2018
1 parent dd477f8 commit d8449ed
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 d8449ed

Please sign in to comment.