From d8449ed1b2327db1d02bf14b0f122479a26bf01c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 21 Apr 2018 16:21:33 +0300 Subject: [PATCH] lib: Mark str_append_n() deprecated 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. --- src/lib/str.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/str.h b/src/lib/str.h index 16edf4c680..ddf24b0428 100644 --- a/src/lib/str.h +++ b/src/lib/str.h @@ -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);