From 9496d3676727d41903b8e5f15f3c9efe183b5c74 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Mon, 21 Nov 2016 12:00:06 +0900 Subject: [PATCH] Fix issue about strtok detected by static analysis tool Change-Id: I3aa91b54122d8f06028f9f0d310dc451babb0f8d Signed-off-by: sungwook79.park --- src/w-input-emoticon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/w-input-emoticon.cpp b/src/w-input-emoticon.cpp index e3b9b9d..d6e17bf 100755 --- a/src/w-input-emoticon.cpp +++ b/src/w-input-emoticon.cpp @@ -313,12 +313,12 @@ void get_recent_emoticons(vector &emoticon_list) PRINTFUNC(DLOG_DEBUG, "str = %s", str); if (str != NULL) { - char *tok; - tok = strtok(str, ","); + char *tok, *ptr; + tok = strtok_r(str, ",", &ptr); while (tok != NULL) { PRINTFUNC(DLOG_DEBUG, "tok = %s", tok); emoticon_list.push_back(strtol(tok, (char **)NULL, 10)); - tok = strtok(NULL, ","); + tok = strtok_r(NULL, ",", &ptr); } } -- 2.7.4