On 10/27/2012 05:25 AM, Amos Jeffries wrote:

> Since the tokens we are looking for are followed by SP or the only thing
> on the line we can do this without worrying what EOL might be:
> 
> "
>         if (!strncmp(p,"OK",2) && (len == 2 || p[2] == ' ')) {
>             result = HelperReply::Okay;
>             p+=2;
>         } else if (!strncmp(p,"ERR",3) && (len == 3 || p[3] == ' ')) {
>             result = HelperReply::Error;
>             p+=3;
>         } else if (!strncmp(p,"BH",2) && (len == 2 || p[2] == ' ')) {
> "

Looks good to me.


Thank you,

Alex.

Reply via email to