From: sungwook79.park Date: Mon, 21 Nov 2016 03:00:06 +0000 (+0900) Subject: Fix issue about strtok detected by static analysis tool X-Git-Tag: accepted/tizen/common/20161128.064207~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Finputdelegator.git;a=commitdiff_plain;h=9496d3676727d41903b8e5f15f3c9efe183b5c74 Fix issue about strtok detected by static analysis tool Change-Id: I3aa91b54122d8f06028f9f0d310dc451babb0f8d Signed-off-by: sungwook79.park --- 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); } }