Source
874
874
size_t zbx_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
875
875
876
876
void zbx_strncpy_alloc(char **str, size_t *alloc_len, size_t *offset, const char *src, size_t n);
877
877
void zbx_strcpy_alloc(char **str, size_t *alloc_len, size_t *offset, const char *src);
878
878
void zbx_chrcpy_alloc(char **str, size_t *alloc_len, size_t *offset, char c);
879
879
880
880
/* secure string copy */
881
881
#define strscpy(x, y) zbx_strlcpy(x, y, sizeof(x))
882
882
#define strscat(x, y) zbx_strlcat(x, y, sizeof(x))
883
883
size_t zbx_strlcpy(char *dst, const char *src, size_t siz);
884
-
size_t zbx_strlcat(char *dst, const char *src, size_t siz);
884
+
void zbx_strlcat(char *dst, const char *src, size_t siz);
885
885
886
886
char *zbx_dvsprintf(char *dest, const char *f, va_list args);
887
887
888
888
#ifdef HAVE___VA_ARGS__
889
889
# define zbx_dsprintf(dest, fmt, ...) __zbx_zbx_dsprintf(dest, ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
890
890
# define zbx_strdcatf(dest, fmt, ...) __zbx_zbx_strdcatf(dest, ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
891
891
#else
892
892
# define zbx_dsprintf __zbx_zbx_dsprintf
893
893
# define zbx_strdcatf __zbx_zbx_strdcatf
894
894
#endif