[En-Nut-Discussion] FIX in pppdebug

ole.reinhardt at embedded-it.de ole.reinhardt at embedded-it.de
Fri May 3 12:11:58 CEST 2013


Hi Harald,

Sorry, it was a bit late when I applied it :-) 

Btw: I'm on holidays for the next 5 days but can fix this as soon as I'm back home.

Bye, ole

Von meinem Android-Gerät gesendet.

-----Original Message-----
From: Harald Kipp <harald.kipp at egnite.de>
To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
Sent: Fr., 03 Mai 2013 11:22
Subject: Re: [En-Nut-Discussion] FIX in pppdebug

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

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list