Code review - Issue 11537044: code review 11537044: net: remove unnecessary bit maskinghttps://codereview.appspot.com/2013-07-22T11:09:08+00:00rietveld
Message from unknown
2013-07-22T08:22:33+00:00mikiourn:md5:f8353ecb935ecda17624714ac72157e0
Message from unknown
2013-07-22T08:22:43+00:00mikiourn:md5:bf32f70f6ca36a80387336e66a2033a5
Message from unknown
2013-07-22T08:30:20+00:00mikiourn:md5:4fa2468a66bd4b35394927c4028dcb45
Message from mikioh.mikioh@gmail.com
2013-07-22T08:30:27+00:00mikiourn:md5:2567a10548d16898b8fe3015d493b4a9
Hello dave@cheney.net (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go
Message from dave@cheney.net
2013-07-22T10:36:53+00:00dfcurn:md5:26da81e8e5a38dfaa3b25e984284328f
LGTM.
On Mon, Jul 22, 2013 at 6:30 PM, <mikioh.mikioh@gmail.com> wrote:
> Reviewers: dfc,
>
> Message:
> Hello dave@cheney.net (cc: golang-dev@googlegroups.com),
>
> I'd like you to review this change to
> https://code.google.com/p/go
>
>
> Description:
> net: remove unnecessary bit masking
>
> Please review this at https://codereview.appspot.com/11537044/
>
> Affected files:
> M src/pkg/net/ipraw_test.go
>
>
> Index: src/pkg/net/ipraw_test.go
> ===================================================================
> --- a/src/pkg/net/ipraw_test.go
> +++ b/src/pkg/net/ipraw_test.go
> @@ -266,7 +266,7 @@
> s = s + s>>16
> // Place checksum back in header; using ^= avoids the
> // assumption the checksum bytes are zero.
> - b[2] ^= byte(^s & 0xff)
> + b[2] ^= byte(^s)
> b[3] ^= byte(^s >> 8)
> return b, nil
> }
> @@ -309,8 +309,8 @@
> // reply message body p.
> func (p *icmpEcho) Marshal() ([]byte, error) {
> b := make([]byte, 4+len(p.Data))
> - b[0], b[1] = byte(p.ID>>8), byte(p.ID&0xff)
> - b[2], b[3] = byte(p.Seq>>8), byte(p.Seq&0xff)
> + b[0], b[1] = byte(p.ID>>8), byte(p.ID)
> + b[2], b[3] = byte(p.Seq>>8), byte(p.Seq)
> copy(b[4:], p.Data)
> return b, nil
> }
>
>
Message from unknown
2013-07-22T11:08:49+00:00mikiourn:md5:829c02f8295bf18b2e3682309a398efb
Message from mikioh.mikioh@gmail.com
2013-07-22T11:09:08+00:00mikiourn:md5:39324d2bbe7d35fd2a2f3249acb93403
*** Submitted as https://code.google.com/p/go/source/detail?r=5c948e69f885 ***
net: remove unnecessary bit masking
R=dave
CC=golang-dev
https://codereview.appspot.com/11537044