lf_text() should use a const char * otherwise it makes it more complex
to use data coming from const strings.
*
* Return the adress of the \0 character, or NULL on error
*/
-char *lf_text(char *dst, char *src, size_t size, struct logformat_node *node);
+char *lf_text(char *dst, const char *src, size_t size, struct logformat_node *node);
/*
* Write a IP adress to the log string
*
* Return the adress of the \0 character, or NULL on error
*/
-char *lf_text(char *dst, char *src, size_t size, struct logformat_node *node)
+char *lf_text(char *dst, const char *src, size_t size, struct logformat_node *node)
{
int n;
return 0;
list_for_each_entry(tmp, list_format, list) {
- char *src = NULL;
+ const char *src = NULL;
switch (tmp->type) {
case LOG_FMT_SEPARATOR: