Use int for ReadDirRequest.Size, matching slices.

geesefs-0-30-9
Aaron Jacobs 2015-02-27 12:23:32 +11:00
parent 085c6d19aa
commit 941a56eb0e
2 changed files with 2 additions and 2 deletions

View File

@ -298,7 +298,7 @@ type ReadDirRequest struct {
// The maximum number of bytes to return in ReadDirResponse.Data. A smaller
// number is acceptable.
Size uint64
Size int
}
type ReadDirResponse struct {

View File

@ -69,7 +69,7 @@ func (fs *HelloFS) ReadDir(
// Resume at the specified offset into the array.
for _, e := range entries {
resp.Data = fuseutil.AppendDirent(resp.Data, e)
if uint64(len(resp.Data)) > req.Size {
if len(resp.Data) > req.Size {
resp.Data = resp.Data[:req.Size]
break
}