utils: Add cstr_token() function
authorMax Stepanov <Max.Stepanov@intel.com>
Thu, 2 Jul 2015 13:21:19 +0000 (16:21 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 26 Jul 2015 21:47:19 +0000 (00:47 +0300)
commitadd59757519aa8222c9c3b2f9ece60137a28b8e7
treef844929702c1916b621329155378504a6e2a328b
parente999e56c2c878c26f2c9ed61da1af9dce652e228
utils: Add cstr_token() function

Add an auxiliary cstr_token() function to get a token from a const char
string. The function usage syntax is similar to str_token(), but unlike
str_token() the function doesn't modify the buffer of the string. Change
str_token() function implementation to use cstr_token().

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
src/utils/common.c
src/utils/common.h