Commit d6ee6c2d authored by Joe Tsai's avatar Joe Tsai Committed by Brad Fitzpatrick

hash/crc32: rename iEEETable to ieeeTable

iEEETable violates the Go naming conventions and is inconsistent
with the rest of the package. Use ieeeTable instead.

Change-Id: I04b201aa39759d159de2b0295f43da80488c2263
Reviewed-on: https://go-review.googlesource.com/17068Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent ec3daf0c
......@@ -57,9 +57,9 @@ var IEEETable = makeTable(IEEE)
// slicing8Table is array of 8 Tables
type slicing8Table [8]Table
// iEEETable8 is the slicing8Table for IEEE
var iEEETable8 *slicing8Table
var iEEETable8Once sync.Once
// ieeeTable8 is the slicing8Table for IEEE
var ieeeTable8 *slicing8Table
var ieeeTable8Once sync.Once
// MakeTable returns a Table constructed from the specified polynomial.
// The contents of this Table must not be modified.
......
......@@ -44,10 +44,10 @@ func updateIEEE(crc uint32, p []byte) uint32 {
// only use slicing-by-8 when input is >= 4KB
if len(p) >= 4096 {
iEEETable8Once.Do(func() {
iEEETable8 = makeTable8(IEEE)
ieeeTable8Once.Do(func() {
ieeeTable8 = makeTable8(IEEE)
})
return updateSlicingBy8(crc, iEEETable8, p)
return updateSlicingBy8(crc, ieeeTable8, p)
}
return update(crc, IEEETable, p)
......
......@@ -27,10 +27,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
func updateIEEE(crc uint32, p []byte) uint32 {
// only use slicing-by-8 when input is >= 4KB
if len(p) >= 4096 {
iEEETable8Once.Do(func() {
iEEETable8 = makeTable8(IEEE)
ieeeTable8Once.Do(func() {
ieeeTable8 = makeTable8(IEEE)
})
return updateSlicingBy8(crc, iEEETable8, p)
return updateSlicingBy8(crc, ieeeTable8, p)
}
return update(crc, IEEETable, p)
......
......@@ -16,10 +16,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
func updateIEEE(crc uint32, p []byte) uint32 {
// only use slicing-by-8 when input is >= 4KB
if len(p) >= 4096 {
iEEETable8Once.Do(func() {
iEEETable8 = makeTable8(IEEE)
ieeeTable8Once.Do(func() {
ieeeTable8 = makeTable8(IEEE)
})
return updateSlicingBy8(crc, iEEETable8, p)
return updateSlicingBy8(crc, ieeeTable8, p)
}
return update(crc, IEEETable, p)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment