Commit 4d148125 authored by Dave Jones's avatar Dave Jones

[PATCH] strtok->strsep in atari config

parent 71e9dd0d
...@@ -205,14 +205,16 @@ void __init atari_switches_setup( const char *str, unsigned len ) ...@@ -205,14 +205,16 @@ void __init atari_switches_setup( const char *str, unsigned len )
char switches[len+1]; char switches[len+1];
char *p; char *p;
int ovsc_shift; int ovsc_shift;
char *args = switches;
/* copy string to local array, strtok works destructively... */ /* copy string to local array, strsep works destructively... */
strncpy( switches, str, len ); strncpy( switches, str, len );
switches[len] = 0; switches[len] = 0;
atari_switches = 0; atari_switches = 0;
/* parse the options */ /* parse the options */
for( p = strtok( switches, "," ); p; p = strtok( NULL, "," ) ) { while ((p = strsep(&args, ",")) != NULL) {
if (!*p) continue;
ovsc_shift = 0; ovsc_shift = 0;
if (strncmp( p, "ov_", 3 ) == 0) { if (strncmp( p, "ov_", 3 ) == 0) {
p += 3; p += 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment