Re: match_token weird behavior

2014-09-18 Thread Steve French
On Wed, Sep 17, 2014 at 2:05 PM, Steve French wrote: > Looking at more examples, some of which are much larger match tables > maybe it has to do with how the final entry is defined. In this > example the NULL match is explicitly stated. > > static const match_table_t cifs_secflavor_tokens = { >

Re: match_token weird behavior

2014-09-18 Thread Steve French
On Wed, Sep 17, 2014 at 2:05 PM, Steve French smfre...@gmail.com wrote: Looking at more examples, some of which are much larger match tables maybe it has to do with how the final entry is defined. In this example the NULL match is explicitly stated. static const match_table_t

Re: match_token weird behavior

2014-09-17 Thread Steve French
Looking at more examples, some of which are much larger match tables maybe it has to do with how the final entry is defined. In this example the NULL match is explicitly stated. static const match_table_t cifs_secflavor_tokens = { { Opt_sec_krb5, "krb5" }, { Opt_sec_krb5i, "krb5i" },

Re: match_token weird behavior

2014-09-17 Thread Steve French
For additional information the strings that are being matched against are: #define SMB1_VERSION_STRING"1.0" #define SMB20_VERSION_STRING"2.0" #define SMB21_VERSION_STRING"2.1" #define SMB30_VERSION_STRING"3.0" #define SMB302_VERSION_STRING"3.02" #define SMB31_VERSION_STRING

Re: match_token weird behavior

2014-09-17 Thread Randy Dunlap
On 09/17/14 13:33, Randy Dunlap wrote: > On 09/17/14 11:20, Steve French wrote: >> Noticing something very strange with match_token. I had five strings >> I need to compare a version string (protocol dialect eg. "2.1" or >> "3.0") against, to find which it matches (if any), but adding one to >>

Re: match_token weird behavior

2014-09-17 Thread Randy Dunlap
On 09/17/14 11:20, Steve French wrote: > Noticing something very strange with match_token. I had five strings > I need to compare a version string (protocol dialect eg. "2.1" or > "3.0") against, to find which it matches (if any), but adding one to > the list (now checking for one of six strings

match_token weird behavior

2014-09-17 Thread Steve French
Noticing something very strange with match_token. I had five strings I need to compare a version string (protocol dialect eg. "2.1" or "3.0") against, to find which it matches (if any), but adding one to the list (now checking for one of six strings instead of five) causes the error case to

match_token weird behavior

2014-09-17 Thread Steve French
Noticing something very strange with match_token. I had five strings I need to compare a version string (protocol dialect eg. 2.1 or 3.0) against, to find which it matches (if any), but adding one to the list (now checking for one of six strings instead of five) causes the error case to always

Re: match_token weird behavior

2014-09-17 Thread Randy Dunlap
On 09/17/14 11:20, Steve French wrote: Noticing something very strange with match_token. I had five strings I need to compare a version string (protocol dialect eg. 2.1 or 3.0) against, to find which it matches (if any), but adding one to the list (now checking for one of six strings instead

Re: match_token weird behavior

2014-09-17 Thread Randy Dunlap
On 09/17/14 13:33, Randy Dunlap wrote: On 09/17/14 11:20, Steve French wrote: Noticing something very strange with match_token. I had five strings I need to compare a version string (protocol dialect eg. 2.1 or 3.0) against, to find which it matches (if any), but adding one to the list (now

Re: match_token weird behavior

2014-09-17 Thread Steve French
For additional information the strings that are being matched against are: #define SMB1_VERSION_STRING1.0 #define SMB20_VERSION_STRING2.0 #define SMB21_VERSION_STRING2.1 #define SMB30_VERSION_STRING3.0 #define SMB302_VERSION_STRING3.02 #define SMB31_VERSION_STRING3.1 The

Re: match_token weird behavior

2014-09-17 Thread Steve French
Looking at more examples, some of which are much larger match tables maybe it has to do with how the final entry is defined. In this example the NULL match is explicitly stated. static const match_table_t cifs_secflavor_tokens = { { Opt_sec_krb5, krb5 }, { Opt_sec_krb5i, krb5i }, {