BigW Consortium Gitlab

Commit fdcd2f19 by Shinya Maeda

Improve calc_read_size

parent 8c1b07e0
...@@ -116,12 +116,8 @@ module Gitlab ...@@ -116,12 +116,8 @@ module Gitlab
end end
def calc_read_size(pos, max) def calc_read_size(pos, max)
if pos > max remain = max - pos
BUFFER_SIZE + (pos - max) (remain > BUFFER_SIZE) ? BUFFER_SIZE : remain
else
remain = max - pos
(remain > BUFFER_SIZE) ? BUFFER_SIZE : remain
end
end end
end end
end end
......
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