Hi Denis,

> > This is first of all violating the coding style with the indentation on
> > the second line of the if, but it is also way too complicated.
> 
> There is actually a reason for this. 
> 
> >
> >     if (info->len == -1 && !strcmp(line, info->terminator)
> >             return TRUE;
> 
> This part checks for static terminators, like "OK" or "BUSY" or ERROR.  We do 
> whole string comparison here.
> 
> >
> >     if (info->len > 0 && !strncmp(line, info->terminator, ...))
> >             return TRUE;
> 
> This part checks for variable terminators.  E.g. +CMS ERROR: XXX.  These are 
> well defined by the standard so we only do a prefix comparison for these.

and your point is? I was just going by the pure algorithmic of the if
statement to make it actually readable without getting a headache ;)

Regards

Marcel



_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to