Hi Yang,

looks good so far, but ...

> +static gboolean check_terminator(struct terminator_info *info, char
> *line)
> +{
> +       if ((info->len == -1 && !strcmp(line, info->terminator)) ||
> +               (info->len > 0 && !strncmp(line, info->terminator,
> info->len)))
> +               return TRUE;
> +       else
> +               return FALSE;
> +}
> + 

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.

        if (info->len == -1 && !strcmp(line, info->terminator)
                return TRUE;

        if (info->len > 0 && !strncmp(line, info->terminator, ...))
                return TRUE;

        return FALSE;

Maybe it is too early in the morning to do code review, but this should
be doing the same, but be a lot simpler to read ;)

Regards

Marcel


_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to