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:
parent
bd4aa3d2fa
commit
3c28012a87
1 changed files with 4 additions and 1 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue