public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@intracom.gr>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] fix comment in net.c
Date: Thu, 10 Nov 2005 09:56:53 +0200	[thread overview]
Message-ID: <4372FD45.8080807@intracom.gr> (raw)
In-Reply-To: <4372896E.9080204@freescale.com>

Ron Alder wrote:
> This patch fixes a comment in net/net.c
> 
> CHANGELOG:
> * Fix comment in net/net.c
>  Patch by Ron Alder, 09 Nov 2005
> 
> 
> ------------------------------------------------------------------------
> 
> diff --git a/net/net.c b/net/net.c
> --- a/net/net.c
> +++ b/net/net.c
> @@ -829,7 +829,6 @@ static ushort CDP_compute_csum(const uch
>  		}
>  		if (len) {
>  			leftover = (signed short)(*(const signed char *)buff);
> -			/* * XXX CISCO SUCKS big time! (and blows too) */
>  			result = (result & 0xffff0000) | ((result + leftover) & 0x0000ffff);
>  		}
>  		while (result >> 16)

WTF is this? Politically correct day?

Since I wrote the comment in question let me elaborate.

CDP uses the ip checksum algorithm with a twist; for the last
byte it *sign* extends and sums. Obviously this is is completely
braindead, and warants the comment and much more :)

Regards

Pantelis

  parent reply	other threads:[~2005-11-10  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 23:42 [U-Boot-Users] [PATCH] fix comment in net.c Ron Alder
2005-11-09 23:49 ` Wolfgang Denk
2005-11-10  7:56 ` Pantelis Antoniou [this message]
2005-11-10 17:28   ` Tolunay Orkun
2005-11-10 19:59     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4372FD45.8080807@intracom.gr \
    --to=panto@intracom.gr \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox