commit | 6cbfcb852273ad62b69f7dc9525b1a59cc5da08b | [log] [tgz] |
---|---|---|
author | Logan Chien <loganchien@google.com> | Wed Dec 05 14:29:36 2018 +0800 |
committer | Logan Chien <loganchien@google.com> | Wed Dec 05 14:29:36 2018 +0800 |
tree | 170d0efcf6e957a940382f83ad93680b952317fc | |
parent | c78aa7e0a031882222d7bf5c2eb5fd03df19b9b9 [diff] |
def-tool: Replace buf.size() with len(buf). This commit replaces `buf.size()` with `len(buf)`. The former returns the file size and the later returns the mapped buffer size. `len(buf)` is more general because `buf.size()` is only available to `mmap` instances. Test: tests/run.py Change-Id: I66e8ecd5b475f4fc686aba062b3486ce4ac7f882