<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 08/15/2018 09:11 PM, Colin King
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20180815131129.24146-5-colin.king@canonical.com">
      <pre wrap="">From: Colin Ian King <a class="moz-txt-link-rfc2396E" href="mailto:colin.king@canonical.com"><colin.king@canonical.com></a>

Argument str should not be const as strtok_r can modify it; remove
the const.

Signed-off-by: Colin Ian King <a class="moz-txt-link-rfc2396E" href="mailto:colin.king@canonical.com"><colin.king@canonical.com></a>
---
 src/lib/include/fwts_log.h | 2 +-
 src/lib/src/fwts_log.c     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/include/fwts_log.h b/src/lib/include/fwts_log.h
index 0ddcf76f..e9da27b3 100644
--- a/src/lib/include/fwts_log.h
+++ b/src/lib/include/fwts_log.h
@@ -129,7 +129,7 @@ int       fwts_log_printf(const fwts_framework *fw, const fwts_log_field field,
        __attribute__((format(printf, 7, 8)));
 void      fwts_log_newline(fwts_log *log);
 void      fwts_log_underline(fwts_log *log, const int ch);
-void      fwts_log_set_field_filter(const char *str);
+void      fwts_log_set_field_filter(char *str);
 int       fwts_log_set_owner(fwts_log *log, const char *owner);
 void      fwts_log_set_format(const char *str);
 void      fwts_log_print_fields(void);
diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
index 32406f30..5a7151ec 100644
--- a/src/lib/src/fwts_log.c
+++ b/src/lib/src/fwts_log.c
@@ -274,7 +274,7 @@ void fwts_log_filter_unset_field(const fwts_log_field filter)
  *     list of field names. ~ or ^ prefix to a field name
  *     clears a bit.
  */
-void fwts_log_set_field_filter(const char *str)
+void fwts_log_set_field_filter(char *str)
 {
        char *saveptr;
        fwts_log_field field;
@@ -282,7 +282,7 @@ void fwts_log_set_field_filter(const char *str)
        for (;; str=NULL) {
                char *token;
 
-               if ((token = strtok_r((char*)str, ",|", &saveptr)) == NULL)
+               if ((token = strtok_r(str, ",|", &saveptr)) == NULL)
                        break;
                if (*token == '^' || *token == '~') {
                        field = fwts_log_str_to_field(token+1);
</pre>
    </blockquote>
    <br>
    Acked-by: Ivan Hu <a class="moz-txt-link-rfc2396E"
      href="mailto:ivan.hu@canonical.com"><ivan.hu@canonical.com></a>
  </body>
</html>