mirror of
https://github.com/golang/go
synced 2024-11-26 14:08:37 -07:00
I guess I forgot there was a unary ^ operator.
R=r DELTA=3 (0 added, 1 deleted, 2 changed) OCL=29151 CL=29176
This commit is contained in:
parent
96cfd154d8
commit
f2dfc55f34
@ -81,12 +81,11 @@ func (d *digest) Reset() {
|
||||
}
|
||||
|
||||
func update(crc uint32, tab *Table, p []byte) uint32 {
|
||||
crc ^= 0xFFFFFFFF;
|
||||
crc = ^crc;
|
||||
for i := 0; i < len(p); i++ {
|
||||
crc = tab[byte(crc) ^ p[i]] ^ (crc >> 8);
|
||||
}
|
||||
crc ^= 0xFFFFFFFF;
|
||||
return crc;
|
||||
return ^crc;
|
||||
}
|
||||
|
||||
func (d *digest) Write(p []byte) (n int, err os.Error) {
|
||||
|
Loading…
Reference in New Issue
Block a user