12483: Simplify extent packing, reduce type casting.
[arvados.git] / sdk / go / keepclient / block_cache.go
index c1138fab99fede7f223bfb290a7fa253e7cb66d2..539975e1616637cad2d002c8e9e7d697c0820f63 100644 (file)
@@ -51,15 +51,15 @@ func (c *BlockCache) Sweep() {
 
 // ReadAt returns data from the cache, first retrieving it from Keep if
 // necessary.
-func (c *BlockCache) ReadAt(kc *KeepClient, locator string, p []byte, off int64) (int, error) {
+func (c *BlockCache) ReadAt(kc *KeepClient, locator string, p []byte, off int) (int, error) {
        buf, err := c.Get(kc, locator)
        if err != nil {
                return 0, err
        }
-       if off > int64(len(buf)) {
+       if off > len(buf) {
                return 0, io.ErrUnexpectedEOF
        }
-       return copy(p, buf[int(off):]), nil
+       return copy(p, buf[off:]), nil
 }
 
 // Get returns data from the cache, first retrieving it from Keep if