Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
f2dfc55f
Commit
f2dfc55f
authored
May 21, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I guess I forgot there was a unary ^ operator.
R=r DELTA=3 (0 added, 1 deleted, 2 changed) OCL=29151 CL=29176
parent
96cfd154
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
crc32.go
src/lib/hash/crc32/crc32.go
+2
-3
No files found.
src/lib/hash/crc32/crc32.go
View file @
f2dfc55f
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment