1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Use strtok_r not strtok.

This commit is contained in:
Dave Davenport 2014-07-22 08:21:56 +02:00
parent bd4aa3d2fa
commit 3c28012a87

View file

@ -2042,9 +2042,12 @@ static void config_sanity_check ( void )
static void setup_switchers ( void )
{
char *savept;
char *switcher_str = strdup ( config.switchers );
char *token;
for ( token = strtok ( switcher_str, "," ); token != NULL; token = strtok ( NULL, "," ) ) {
for ( token = strtok_r ( switcher_str, "," ,&savept);
token != NULL;
token = strtok_r ( NULL, ",",&savept ) ) {
if ( strcasecmp ( token, "window" ) == 0 ) {
switchers = (Switcher *) realloc ( switchers, sizeof ( Switcher ) * ( num_switchers + 1 ) );
copy_string ( switchers[num_switchers].name, "window", 32 );