[En-Nut-Discussion] FIX in pppdebug

Harald Kipp harald.kipp at egnite.de
Fri May 3 11:22:13 CEST 2013


Krzysztof,

On 11.04.2013 17:16, Krzysztof Sawicki wrote:
> +        if ((nb->nb_dl.sz)>(ppp_header_sz + sizeof(XCPHDR)))
> +        {

Thanks for this patch and thanks to Ole for applying.

But pleeeeease... honor the coding style.

http://www.ethernut.de/en/documents/programming-style-guide.html

The above line breaks several rules:

- K&R style places curly braces on the same line as the related if.
- Do only add brackets in expressions, when they are really required.
- Even if breaking the rules, which is highly discouraged, be
consistent! The above line surrounds one operator with spaces but not
the other.

The above line should have simply been:

 if (nb->nb_dl.sz > ppp_header_sz + sizeof(XCPHDR)) {

Regards,

Harald



More information about the En-Nut-Discussion mailing list